Borrow a heap whose roots, barriers and reference policy belong to a host runtime.
More...
|
| | host (heap &storage, std::size_t prefix) noexcept |
| | Reserve an identical guard in both fresh, fixed-size generations.
|
| | ~host () noexcept |
| | Release the capability after finishing its last collection.
|
| void | publish (generation which, void *target, std::size_t skip, std::size_t count) const noexcept |
| | Publish one generation at a stable VM-owned address.
|
| void | unpublish (void *target, std::size_t count) const noexcept |
| | Remove a canonical alias without releasing the host's reservation.
|
| offset | allocate (generation which, std::size_t words) noexcept |
| | Allocate raw cells in either generation, preserving the tag bit. A host may subdivide the extent; scanner claims determine record boundaries.
|
| pin * | pin_object (offset at, std::size_t words) noexcept |
| | Alias a complete allocated object without collecting or changing its offset.
|
|
void | unpin (pin *value) noexcept |
| | Release one registration; the last release invalidates its native address.
|
|
template<class F> |
| void | visit_pins (F &&visit) const noexcept |
| | Enumerate open pins as strong roots before reference policy is resolved.
|
|
std::span< gap const > | gaps () const noexcept |
| | Placement padding to format before a VM walks the collected object stream.
|
|
void | track_starts () |
| | Lazily allocate VM-defined object-start bits; enable before a major epoch. Existing objects are discovered by that epoch's tracer, not by this operation.
|
|
bool | tracks_starts () const noexcept |
| | Whether the host opted into object-start transport.
|
| void | record_start (offset at) noexcept |
| | Declare an actual object start after claiming or formatting the object.
|
|
std::span< bitmap const > | starts (generation which) const noexcept |
| | Borrow the bitmap in canonical cell coordinates, one word per mini-page.
|
| void | begin (bool minor) noexcept |
| | Start a VM-owned marking epoch; the VM supplies barriers and weak policy.
|
template<class Trace>
requires std::is_nothrow_invocable_v<Trace &, visitor &, offset> |
| void | trace (std::span< offset const > roots, Trace &&trace, std::size_t marker_limit=1, bool old_owners=false) noexcept |
| | Drain roots using jam's ordinary frontier and persistent worker pool.
|
|
bool | marked (offset at) const noexcept |
| | Exact collected-generation liveness; old objects are live during minors.
|
| bool | prepare (bool promote=false) noexcept |
| | Freeze both forwarding tables after resolving all reference policies.
|
|
offset | forward (offset at) const noexcept |
| | Repair a root while original objects and both forwarding tables remain intact.
|
| void | finish () noexcept |
| | Move survivors, preserving side aliases, then pack the consumed metadata.
|
Borrow a heap whose roots, barriers and reference policy belong to a host runtime.
See hosting a runtime. One capability per heap; it must not outlive the heap. Ordinary Jam roots and collection are excluded.
Definition at line 1224 of file heap.ccm.