Expand description
Allocators Various allocators implementation.
Re-exportsยง
pub use self::immix_allocator::ImmixAllocator;pub use free_list_allocator::FreeListAllocator;
Modulesยง
- allocator ๐
- The allocator trait and allocation-related functions.
- allocators ๐
- A list of all the allocators, embedded in Mutator
- bumpallocator ๐
- Bump pointer allocator
- embedded_
meta_ ๐data - Embedded metadata pages
- free_
list_ allocator - Free list allocator based on Mimalloc
- immix_
allocator - Immix allocator
- large_
object_ ๐allocator - malloc_
allocator ๐ - An alloactor backed by malloc
- markcompact_
allocator ๐ - Mark compact allocator (actually a bump pointer allocator with an extra heade word)
Structsยง
- Allocation
Options - Allow specifying different behaviors with
Allocator::alloc_with_options. - Bump
Allocator - A bump pointer allocator. It keeps a thread local allocation buffer, and bumps a cursor to allocate from the buffer.
- Bump
Pointer - A common fast-path bump-pointer allocator shared across different allocator implementations
that use bump-pointer allocation.
A
BumpPointeris always initialized with cursor = 0, limit = 0, so the first allocation always fails the check ofcursor + size < limitand goes to the slowpath. A binding can also take advantage of this design to zero-initialize the a bump pointer. - Large
Object Allocator - An allocator that only allocates at page granularity. This is intended for large objects.
- Malloc
Allocator - The allocator that internally uses malloc for all the allocation requests. This allocator is only intended for experimental uses.
- Mark
Compact Allocator - A thin wrapper(specific implementation) of bump allocator reserve extra bytes when allocating
Enumsยง
- Allocation
Error - A list of errors that MMTk can encounter during allocation.
- Allocator
Info - This type describes allocator information. It is used to
generate fast paths for the GC. All offset fields are relative to
Mutator. - Allocator
Selector - This type describe an allocator in the
crate::Mutator. For some VM bindings, they may need to access this type from native code. This type is equivalent to the following native types: #[repr(C)] struct AllocatorSelector { tag: AllocatorSelectorTag, payload: u8, } #[repr(u8)] enum AllocatorSelectorTag { BumpPointer, LargeObject, โฆ }
Traitsยง
- Allocator
- A trait which implements allocation routines. Every allocator needs to implements this trait.
Functionsยง
- fill_
alignment_ gap - Fill the specified region with the alignment value.