Skip to content
Mach trap#-63

svc · mach trap -63

mach_vm_reclaim_update_kernel_accounting_trap

Refresh the kernel's view of a process's VM reclaim ring buffer accounting.

Prototype

kern_return_t mach_vm_reclaim_update_kernel_accounting_trap(/* 3 args */);

Returns: kern_return_t

Version history

XNU tagmacOS#
xnu-12377.1.9macOS 26.0 Tahoe-63
xnu-12377.101.15-63
xnu-12377.41.6-63
xnu-12377.61.12-63
xnu-12377.81.4-63

Notes

Modern macOS exposes a userland-driven "VM reclaim" ring that lets a process voluntarily mark pages as discardable so the kernel can repossess them under memory pressure without the cost of full madvise traps. This trap notifies the kernel that the userland indices have moved so its bookkeeping (footprint, ledger entries) stays accurate. It is called by libmalloc's deferred-reclaim path, not by application code.

Detection

DTrace mach_trap provider; per-task reclaim activity also shows up in vm_stat and footprint(1) output.

Related APIs

madvisemach_vm_deallocatetask_infomalloc_zone_pressure_relief