Skip to main content

non_zero_alloc_zeroed

Function non_zero_alloc_zeroed 

Source
pub unsafe fn non_zero_alloc_zeroed(layout: Layout) -> *mut u8
Expand description

std::alloc::alloc_zeroed that accepts zero-sized layouts.

ยงSafety

Same as std::alloc::alloc_zeroed. The returned pointer must be freed with non_zero_dealloc using the same layout.