Function jemalloc_sys::free

source ·
pub unsafe extern "C" fn free(ptr: *mut c_void)
Expand description

Deallocates previously-allocated memory region referenced by ptr.

This makes the space available for future allocations.

If ptr is null, no action occurs.

Safety

The behavior is undefined if:

  • ptr does not match a pointer earlier returned by the memory allocation functions of this crate, or
  • the memory region referenced by ptr has been deallocated.