std::core::mem::vm

decommit

fn void? decommit(void* ptr, usz len, bool block = true)
Notifies that the memory in the region can be released back to the OS. On Win32 this decommits the region,
whereas on Posix it tells the system that it may be reused using madvise. The "block" parameter is only
respected on Posix, and protects the region from read/write/exec. On Win32 this always happens.

Parameters