Structsยง
- Kernel
Heap Failure Snapshot - Locked
Heap - Slab
Diag Snapshot - Slab
Page ๐Header - Header at the base of each 4 KiB page dedicated to a slab class.
- Slab
State ๐ - Per-size-class partial-page lists.
Enumsยง
Constantsยง
- HEAP_
POISON_ ๐ENABLED - MAX_
SLAB_ ๐SIZE - Allocations with effective size above this threshold bypass the slab.
- NUM_
SLABS ๐ - POISON_
BYTE ๐ - Byte pattern written to the body of freed slab blocks.
- SLAB_
CANARY ๐ - Canary word placed at the last 4 bytes of each slab block.
- SLAB_
HEADER_ ๐SIZE - Byte offset at which slab blocks begin within each slab page.
- SLAB_
NUM_ CLASSES - Number of slab size classes.
- SLAB_
SIZES ๐ - Slab block sizes chosen to bound internal fragmentation to ~25% worst-case (average ~12%) instead of 50% with pure power-of-two classes.
Staticsยง
- HEAP_
ALLOCATOR ๐ - LAST_
HEAP_ ๐FAILURE - SLAB_
ALLOC ๐ - SLAB_
PAGES_ ๐ALLOCATED - Total buddy pages ever handed to the slab allocator.
- SLAB_
PAGES_ ๐RECLAIMED - Total buddy pages ever returned from the slab allocator (fully-empty reclaim).
Functionsยง
- alloc_
error_ ๐handler - Allocates error handler.
- alloc_
kernel_ โheap - Compatibility facade over the current global kernel heap policy.
- classify_
kernel_ ๐heap_ backend - dealloc_
kernel_ โheap - Free memory previously returned by
alloc_kernel_heap. - debug_
register_ slab_ trace - Register slab lock for E9 trace (call from init).
- debug_
slab_ lock_ addr - Returns the slab lock address for deadlock tracing.
- dump_
diagnostics - Dump heap and buddy allocator diagnostics to the serial console.
- last_
heap_ failure_ snapshot - log_
buddy_ ๐snapshot - log_
common_ ๐oom_ header - log_
heap_ ๐failure_ policy - record_
heap_ ๐failure - slab_
blocks_ per_ page - Number of blocks that fit in one buddy page for slab class
ci. - slab_
class_ alignment - Guaranteed alignment in bytes for slab class
ci. - slab_
class_ size - Block size in bytes for slab class
ci. - slab_
diag_ snapshot - slab_
page_ in_ partial_ list - Returns whether the slab page at
page_baseis currently present in the partial-page list for classci. - try_
alloc_ โkernel_ heap - Fallible heap entry point with explicit backend-aware errors.