| Previous | Next |
| KERN_MEMORY_DATA_MOVED | KERN_INVALID_PROCESSOR_SET |
KERN_MEMORY_RESTART_COPY
KERN_MEMORY_RESTART_COPY is an internal Mach memory-object result. XNU documents it for a strategic copy attempt where a quicker copy has become possible; the caller should restart with the kernel's quick-copy path. XNU also states that this code is seen only by the kernel.
It is therefore not a normal macOS application failure, even though a tool may display the constant name while decoding low-level logs or headers. Its presence describes an optimization and control-flow decision inside Mach's copy machinery, not data loss or an invalid user buffer.
How to interpret it
- For ordinary application code: look for the higher-level API result, because this return is not intended to cross that boundary.
- For kernel or pager work: preserve the retry/restart semantics rather than treating it as a terminal error.
- For diagnostics: associate it with memory-object copy strategy and copy-on-write behavior, not with filesystem copy operations.
Mach virtual memory uses memory objects and delayed copying to avoid unnecessary data duplication. This return code is part of that internal optimization machinery and is useful mainly when reading kernel source or debugging the memory-management subsystem.
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.