Skip to main content

free_aligned_sized

Function free_aligned_sized 

Source
pub unsafe extern "C" fn free_aligned_sized(
    ptr: *mut c_void,
    alignment: size_t,
    size: size_t,
)
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 aligned_alloc, or alignment and size do not match the values passed to aligned_alloc, or
  • the memory region referenced by ptr has been deallocated.