cptr::vm

Virtual memory helpers for allocators that manage a cage's region. The region starts out reserved but inaccessible: commit a range before using it.

Functions

NameDescription
commit Make [p, p + size) readable and writable. Returns false on failure.]
decommit Give the pages back to the OS and make the range inaccessible again.
purge Give the pages back to the OS but keep the range mapped (on Linux and macOS it reads as zeros afterwards). Commit it again before reuse.