0x0LearnReferenceLibraries0x0.jmp0x1b.com

Allocator Fast Paths And Page Backend

Allocator fast-path evidence defines how native runtime allocation stays local,

bounded, and explicit. This page covers allocator profiles, size classes, local

free lists, local heap ownership, slow-path span refill, remote-free batching,

transfer caches, central page/span management, hosted-server hugepage and NUMA

hooks, stress coverage, and shutdown cleanup.

Run:


make allocator-fast-path-check
make native-memory-control-check

make native-memory-control-check depends on make allocator-fast-path-check.

The allocator gate validates allocator-specific performance, page-backend, and

stress evidence before the broader native memory-control evidence is accepted.

Evidence Files

behavior.

passing.

branch budgets.

behavior.

wiring.

Profiles

The allocator profiles are:

frees, no hugepage or NUMA behavior;

and opt-in hugepage or NUMA hooks;

GC is not the default for any allocator profile.

Fast Paths

Fast paths must fit recorded instruction and branch budgets. Local allocations

use local free lists and local heap ownership. Slow-path refill pulls from

transfer caches or central spans. Remote frees must not perturb the local fast

path except at documented drain points such as safepoints, slow-path refill,

thread exit, message boundaries, actor shutdown, or arena reset.

Page Backend

The page backend owns span allocation, central cache behavior, transfer-cache

refill, exhaustion behavior, and release cleanup. Exhaustion fails closed before

publishing partial values. Shutdown must drain remote-free queues and release

owned spans.

Hugepage and NUMA hooks are allowed only for explicit hosted-server release

profiles. They are disabled by default and rejected for hosted-small,

freestanding, realtime, compiler-internal, and test fixture profiles.

Stress Coverage

The allocator stress suite covers:

Diagnostics

The allocator gate uses stable diagnostics:


ALLOCATOR_FAST_PATH_BUDGET
ALLOCATOR_REMOTE_FREE_OVERFLOW
ALLOCATOR_PAGE_EXHAUSTION
ALLOCATOR_HUGEPAGE_POLICY
ALLOCATOR_NUMA_POLICY
ALLOCATOR_EXHAUSTION
ALLOCATOR_SHUTDOWN_LEAK

Documentation Impact

Runtime memory, native allocation, page backend, hugepage, NUMA, allocator

stress, or shutdown behavior changes must update this page, the allocator

evidence files, release notes, and the public reference index in the same

change.