0x0LearnReferenceLibraries0x0.jmp0x1b.com

RC, Regions, And Optional GC Decision

0x0 uses ownership plus regions as the default memory semantics for native

runtime profiles. Heap allocation is not the semantic foundation. The compiler

must prefer static, stack, region, arena, ownership, or precise reference-count

semantics when the program shape proves those domains are safe.

Run:


make memory-semantics-decision-check
make native-memory-control-check

make native-memory-control-check runs make memory-semantics-decision-check

before the broader native memory-control evidence. That makes the memory model

decision a prerequisite for runtime profile claims.

Decision

The production decision is:

profiles reject implicit GC;

runtime values, and ABI values have explicit ownership or root policy.

Evidence Files

profile.

retain/release reuse, region release, arena reset, optional GC, and host

roots.

transaction, actor mailbox, and bare-metal region scopes.

regional GC policy.

actor, remote-actor, Live, app-runtime, and FFI memory boundaries.

fixtures.

region, root, actor, optional GC, and shutdown stress evidence.

diagnostics.

leak budgets.

wiring.

Optional GC

GC is optional. It is not enabled by default for any profile. A release that

uses GC must opt in through the hosted or optional-gc profile, include target

support, record barrier and metadata policy, and pass pause, throughput, leak,

and shutdown evidence.

Unsupported GC target combinations fail with:


MEMORY_SEMANTICS_GC_TARGET

Implicit default GC fails with:


MEMORY_SEMANTICS_GC_DEFAULT

RC And Regions

Shared heap graphs use precise retain and release insertion. The retain and

release counts must balance, and cycles require cycle detection, explicit

breaks, or optional regional tracing.

Region and arena values release as groups. A value that outlives the release

point must move to a valid longer-lived domain or be rejected.

Diagnostics

The memory-semantics gate uses stable diagnostics:


MEMORY_SEMANTICS_GC_DEFAULT
MEMORY_SEMANTICS_GC_TARGET
MEMORY_SEMANTICS_RC_BALANCE
MEMORY_SEMANTICS_OWNERSHIP
MEMORY_SEMANTICS_CYCLE
MEMORY_SEMANTICS_REGION
MEMORY_SEMANTICS_ROOT
MEMORY_SEMANTICS_ACTOR
MEMORY_SEMANTICS_REMOTE_ACTOR
MEMORY_SEMANTICS_ABI
MEMORY_SEMANTICS_CLOSURE
MEMORY_SEMANTICS_REUSE
MEMORY_SEMANTICS_SHUTDOWN

Documentation Impact

Memory semantics, RC insertion, retain/release reuse, cycle policy, region

release, optional GC, host roots, actor mailbox retention, ABI ownership, or

shutdown behavior changes must update this page, the source-owned

memory-semantics evidence, release notes, and the public reference index in the

same change.