| Previous | Next |
| KERN_INVALID_HOST | KERN_MEMORY_DATA_MOVED |
KERN_MEMORY_PRESENT
KERN_MEMORY_PRESENT is a specialized external-memory-management result. XNU defines it for an attempt to supply “precious” data for memory that is already present in a memory object. It is not a usual error from ordinary macOS application allocation APIs.
Mach virtual memory can be backed by memory objects whose contents are supplied and managed through pager-style interfaces. In that model, the kernel and memory manager coordinate which pages are present and which data may be supplied. Delivering data for a page that is already present conflicts with that state.
Why it matters
- It usually indicates an inconsistency in a custom pager, kernel component, or other external-memory-management path.
- It should be diagnosed from the memory object's state machine and page ownership, not by changing ordinary process heap settings.
- Trace requests and replies for the relevant page range to find duplicate or late data supply.
- Check the semantics of “precious” data in the memory-management implementation before retrying.
For end users this code is generally a symptom emitted by low-level software. For developers working at the Mach memory-object boundary, it identifies a specific contradiction: the manager attempted to provide data for a page already resident in the object.
References
- XNU: kern_return.h
- Apple Kernel Programming Guide: memory objects
- GNU Mach Reference Manual: External Memory Management
Looking for a different code? Search another status or error code.