pub unsafe fn alloc_zeroed(layout: Layout) -> *mut u8Expand description
Allocate zero-initialized memory with the global allocator.
This is equivalent to the standard library’s std::alloc::alloc_zeroed,
but with the addition of leak tracking for allocated objects. Loom’s leak
tracking will not function for allocations not performed via this method.
This function forwards calls to the GlobalAlloc::alloc_zeroed method
of the allocator registered with the #[global_allocator] attribute
if there is one, or the std crate’s default.