| Previous | Next |
| KERN_PROTECTION_FAILURE | KERN_INVALID_ARGUMENT |
KERN_NO_SPACE
KERN_NO_SPACE is a Mach virtual-address-space allocation result. XNU defines it for a range that is already occupied, or for a request whose required contiguous range cannot be found. It does not automatically mean that physical RAM is exhausted.
That distinction is useful when a call uses a fixed address, requests a large contiguous virtual range, or runs in a task whose address map is fragmented. Virtual space, physical memory, and backing-store pressure are related but separate concerns. A process may have available memory while the requested address placement is still impossible.
What to check
- Whether the call insists on a particular address or can let Mach choose a suitable location.
- The requested size, alignment, and whether it must fit as one contiguous range.
- Existing mappings in the target task, including regions created by allocators, shared libraries, JITs, or memory-mapped files.
- Whether the correct result is to request a different placement rather than retry the identical fixed request.
For a true inability to obtain a kernel resource, XNU uses the distinct result KERN_RESOURCE_SHORTAGE. Keeping those two cases separate makes logs much more actionable.
References
- XNU: kern_return.h
- Apple Kernel Programming Guide: Mach overview
- GNU Mach Reference Manual: Virtual Memory Interface
Looking for a different code? Search another status or error code.
