What does macOS kernel return 9 (KERN_MEMORY_FAILURE) mean?

 
Could be also:
ConstantTypeOS
ERROR_INVALID_BLOCKWin32 errorWindows
ippStsNanArgIntel Ipp StatusAny
EBADFerrnoAny
IRQL_NOT_GREATER_OR_EQUALBugCheck CodeWindows
Previous Next
KERN_NO_ACCESS KERN_MEMORY_ERROR

KERN_MEMORY_FAILURE

KERN_MEMORY_FAILURE is a memory-object and page-fault result, not a general-purpose allocation error. XNU defines it for a fault whose target address refers to a memory object that has been destroyed, and explicitly marks the failure as permanent.

Mach virtual memory is backed by memory objects. When a page is needed, Mach obtains data from the object or its pager. If that backing object no longer exists, the kernel cannot satisfy the fault for the old mapping. Retrying the same access without changing the object's lifecycle or the mapping is therefore unlikely to help.

Diagnostic focus

  • Identify the mapping and its backing object or file-like resource.
  • Review teardown ordering: unmap, close, terminate, and invalidate paths should not leave consumers using an obsolete mapping.
  • Check whether another component owns the object and can destroy it while references remain.
  • Distinguish it from KERN_MEMORY_ERROR, which XNU describes as potentially temporary when data cannot currently be returned.

This code is especially relevant to low-level kernel, pager, debugger, and memory-management work. It points to an invalid backing-object lifetime rather than an ordinary invalid pointer in application code.

References


Looking for a different code? Search another status or error code.