Expand description
Using malloc as mark sweep free-list allocator.
Functions§
- align_
alloc - Allocate with alignment. This also guarantees the memory is zero initialized.
- align_
offset_ alloc - Allocate with alignment and offset. Beside returning the allocation result, this will store the malloc result at (result - BYTES_IN_ADDRESS) so we know the original malloc result.
- alloc
- allocate
sizebytes, which is aligned toalignatoffsetreturn the address, and whether it is an offset allocation - free⚠
- get_
malloc_ usable_ size - get malloc usable size of an address is_offset_malloc: whether the address is allocated with some offset
- offset_
free - Free an address that is allocated with an offset (returned by
crate::util::malloc::malloc_ms_util::align_offset_alloc). - offset_
malloc_ usable_ size - Get the malloc usable size for an address that is returned by
crate::util::malloc::malloc_ms_util::align_offset_alloc.