Skip to main content

Module mem

Module mem 

Source

Modules§

alloc
alloc_opts
constants
copy
global
mem
mempool
traits

Structs§

Chunk
A wholesale block of memory obtained via direct_alloc out of which the MemoryPool carves the *mut u8 slots handed to consumers.
DirectAllocator
FreeSlot
A section of continuous free memory within a Chunk.
MemoryPool
Memory pool manager that preallocates memory in chunks of DEFAULT_GLOBAL_MB_ALLOCATION bytes and hands out *mut u8 pointers whose sizes are rounded up to the next power of two.

Constants§

DEFAULT_GLOBAL_MB_ALLOCATION
DEFAULT_GLOBAL_MB_ALLOCATION_LAYOUT
GB
KB
MB
MIN_SLOT_SIZE
Smallest slot size handed out by the pool. Every slot is a power of two and at least this big, so every slot boundary within a Chunk stays a multiple of this value.
NULL_U8_PTR

Statics§

DIRECT_ALLOCATOR

Traits§

AsPtr
AsSlice
SizedType

Functions§

as_slice
as_slice_mut
cast_data_to_ptr
cast_to_nonnull
copy_from_slice
copy_simd_slice
direct_alloc
direct_dealloc
set_and_init_allocator_options
sizeof
zero_memory

Type Aliases§

ChunkList
Bookkeeping list used to track the allocated Chunk instances of a MemoryPool.
FreeList
Bookkeeping list used to track the sections of continuous free memory within a Chunk.