Module mmtk::util::malloc::malloc_ms_util
source · Expand description
Using malloc as mark sweep free-list allocator.
Functions§
- Allocate with alignment. This also guarantees the memory is zero initialized.
- 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.
- allocate
size
bytes, which is aligned toalign
atoffset
return the address, and whether it is an offset allocation - free⚠
- get malloc usable size of an address is_offset_malloc: whether the address is allocated with some offset
- Free an address that is allocated with an offset (returned by
crate::util::malloc::malloc_ms_util::align_offset_alloc
). - Get the malloc usable size for an address that is returned by
crate::util::malloc::malloc_ms_util::align_offset_alloc
.