Skip to main content

Crate snmalloc_sys

Crate snmalloc_sys 

Source

Functions§

sn_rust_alloc
Allocate the memory with the given alignment and size. On success, it returns a pointer pointing to the required memory address. On failure, it returns a null pointer. The client must assure the following things:
sn_rust_alloc_zeroed
Behaves like rust_alloc, but also ensures that the contents are set to zero before being returned.
sn_rust_dealloc
De-allocate the memory at the given address with the given alignment and size. The client must assure the following things:
sn_rust_realloc
Re-allocate the memory at the given address with the given alignment and size. On success, it returns a pointer pointing to the required memory address. The memory content within the new_size will remains the same as previous. On failure, it returns a null pointer. In this situation, the previous memory is not returned to the allocator. The client must assure the following things:
sn_rust_usable_size
Return the available bytes in a memory block.