alloc
Fil-C
Upstream GIMSO, compiler, FilPizlonator.cpp
An allocation: letD, p, allocAlign, Size makes a fresh, zeroed heap object of Size bytes and yields a pointer to it with its capability. The frontend gives every C local one; promote and local_storage remove most of them under -O (promote:promote_module/2, local_storage.pl).
Rocq: the op
Alloc, whose requestheap_reqthe runtime'sallocplaces at a fresh base. A size over 2^48 - 1 trapstoo_bigbefore anything is allocated (interp:alloc_res/6,max_allocation_size); where the runtime cannot hold the object, the run trapsout_of_memory.Upstream every alloca becomes a FUGC allocation too, and FilPizlonator's escape analysis puts those that do not escape back on the stack; promote and local_storage are nanofil's counterpart.
Linked from
- Memory.v: alloc_req
- Ops.v: sign_extension
- Steps.v: alloc_relies
- Steps.v: inst_step_fresh_shape
- Steps.v: op_res_alloc_op
- Syntax.v: op
- Validate.v: alloc_align
- replay
- the formal campaign: Campaign 2: the runtime as axioms
- the formal campaign: What Hello asks of libc
- the guide: 5. Lowering: c_lower.pl
- the guide: Frontend