Struct mimalloc_rust::heap::MiMallocHeap [−][src]
Expand description
Heap type used for allocator API
Fields
heap: T
Implementations
Trait Implementations
🔬 This is a nightly-only experimental API. (
allocator_api
)Attempts to allocate a block of memory. Read more
🔬 This is a nightly-only experimental API. (
allocator_api
)Deallocates the memory referenced by ptr
. Read more
🔬 This is a nightly-only experimental API. (
allocator_api
)Behaves like allocate
, but also ensures that the returned memory is zero-initialized. Read more
🔬 This is a nightly-only experimental API. (
allocator_api
)Attempts to extend the memory block. Read more
unsafe fn grow_zeroed(
&self,
ptr: NonNull<u8>,
old_layout: Layout,
new_layout: Layout
) -> Result<NonNull<[u8]>, AllocError>
unsafe fn grow_zeroed(
&self,
ptr: NonNull<u8>,
old_layout: Layout,
new_layout: Layout
) -> Result<NonNull<[u8]>, AllocError>
🔬 This is a nightly-only experimental API. (
allocator_api
)Behaves like grow
, but also ensures that the new contents are set to zero before being
returned. Read more
🔬 This is a nightly-only experimental API. (
allocator_api
)Attempts to shrink the memory block. Read more