[−][src]Type Definition jemalloc_sys::extent_purge_t
type extent_purge_t = unsafe extern "C" fn(extent_hooks: *mut extent_hooks_t, addr: *mut c_void, size: size_t, offset: size_t, length: size_t, arena_ind: c_uint) -> c_int;
Extent purge function.
Discards physical pages within the virtual memory mapping associated with an
extent at given addr
and size
at offset
bytes, extending for length
on
behalf of arena arena_ind
.
A lazy extent purge function (e.g. implemented via madvise(...MADV_FREE)
)
can delay purging indefinitely and leave the pages within the purged virtual
memory range in an indeterminite state, whereas a forced extent purge
function immediately purges, and the pages within the virtual memory range
will be zero-filled the next time they are accessed. If the function returns
true
, this indicates failure to purge.