[][src]Trait allocator_suite::allocators::global::local_allocator::LocalAllocator

pub trait LocalAllocator: Allocator {
    fn memory_range(&self) -> MemoryRange;

    fn contains(&self, from_memory_address: MemoryAddress) -> bool { ... }
}

A local allocator is an allocator with a known range of memory addresses it uses for allocated memory.

This allows logic to determine which allocator should be used to free (deallocate) which memory pointers.

Required methods

fn memory_range(&self) -> MemoryRange

The range of memory addresses that can be used to allocate memory by this allocator.

This function is called repeatedly, so ideally should be inline and fast.

Loading content...

Provided methods

fn contains(&self, from_memory_address: MemoryAddress) -> bool

Returns true if this allocator is responsible for an allocation starting with the given from_memory_address.

This function is called repeatedly, so ideally should be inline and fast.

Loading content...

Implementors

impl<MS: MemorySource> LocalAllocator for ContextAllocator<MS>[src]

impl<MS: MemorySource> LocalAllocator for BitSetAllocator<MS>[src]

impl<MS: MemorySource> LocalAllocator for BumpAllocator<MS>[src]

impl<MS: MemorySource> LocalAllocator for MultipleBinarySearchTreeAllocator<MS>[src]

Loading content...