[−][src]Trait context_allocator::memory_sources::MemorySource
A memory source is a sort-of crude allocator that can obtain and release memory, from, say, the operating system, an arena or some fixed range.
It is thread-aware but not necessarily thread-safe.
Required methods
fn obtain(&self, non_zero_size: NonZeroUsize) -> Result<MemoryAddress, AllocErr>
Obtain memory from the operating system, say.
Alignment will be whatever is appropriate, but is likely to be quite large.
fn release(&self, non_zero_size: NonZeroUsize, current_memory: MemoryAddress)
Release memory to the operating system, say.
Alignment will be whatever is appropriate, but is likely to be quite large.