0x0LearnReferenceLibraries0x0.jmp0x1b.com

Stack, Region, Arena, And Escape Promotion

Allocation promotion moves values away from the general heap only when the

compiler has a checked lifetime proof. The default is conservative: keep a

value on the heap unless escape, alias, ownership, closure, actor,

host-buffer, and FFI evidence proves a cheaper domain is safe.

Run:


make region-arena-promotion-check
make escape-analysis-check

make escape-analysis-check runs make region-arena-promotion-check before

the existing escape-analysis evidence. That keeps heap-elision decisions tied

to the same escape facts used by the optimizer.

Evidence Files

that can permit or block promotion.

arena, heap, and dynamic-heapification domains.

replacement decisions.

promotion decisions.

arena lifetimes.

where a promoted value may be dynamically heapified.

fixtures.

release-point checks.

stress coverage.

promotion diagnostics.

reductions and analysis budgets.

gate wiring.

Promotion Domains

The promotion domains are:

storage or request-local app runtime state;

may start in a cheaper domain but must be heapified before a proven escape.

Dynamic heapification is not a general escape hatch. It is allowed only when a

target has explicit heapification proof and release evidence.

Escape Categories

Promotion is invalidated by:

The gate fails closed when any of these categories contradicts the chosen

target domain.

Diagnostics

The promotion gate uses stable diagnostics:


ALLOCATION_PROMOTION_LIFETIME
ALLOCATION_PROMOTION_ALIAS
ALLOCATION_PROMOTION_OWNERSHIP
ALLOCATION_PROMOTION_CLOSURE
ALLOCATION_PROMOTION_ACTOR
ALLOCATION_PROMOTION_HOST_BUFFER
ALLOCATION_PROMOTION_FFI
ALLOCATION_PROMOTION_SCALAR
ALLOCATION_PROMOTION_STACK
ALLOCATION_PROMOTION_REGION
ALLOCATION_PROMOTION_HEAPIFY

ALLOCATION_PROMOTION_STACK means a stack-targeted value is not frame-local.

ALLOCATION_PROMOTION_HEAPIFY means the target lacks proof for dynamic

heapification or heap traffic regressed after promotion.

Documentation Impact

Allocation promotion, region lifetime, arena lifetime, scalar replacement,

dynamic heapification, or escape diagnostic changes must update this page, the

source-owned promotion evidence, release notes, and the public reference index

in the same change.