|
x-engine-c v0.2.13
The C engine for x-lang
|
Navigate the heap/GC section of the base object tree. More...
Macros | |
| #define | x_base_field_heap_group(X) x_firstobj(x_restobj(x_base_field_meta_group(X))) |
| #define | x_base_field_obj_meta_extra(X) x_firstobj(x_base_field_heap_group(X)) |
| #define | x_base_field_heap_mark(X) x_firstobj(x_restobj(x_base_field_heap_group(X))) |
| #define | x_base_field_heap_free(X) x_firstobj(x_restobj(x_restobj(x_base_field_heap_group(X)))) |
| #define | x_base_field_heap_mark_hooks(X) x_firstobj(x_restobj(x_restobj(x_restobj(x_base_field_heap_group(X))))) |
| #define | x_base_field_heap_free_hooks(X) x_firstobj(x_restobj(x_restobj(x_restobj(x_restobj(x_base_field_heap_group(X)))))) |
| #define | x_base_field_heap_mark_roots(X) x_firstobj(x_restobj(x_restobj(x_restobj(x_restobj(x_restobj(x_base_field_heap_group(X))))))) |
| #define | x_base_field_heap_root_chain(X) x_firstobj(x_restobj(x_restobj(x_restobj(x_restobj(x_restobj(x_restobj(x_base_field_heap_group(X)))))))) |
Navigate the heap/GC section of the base object tree.
| #define x_base_field_heap_free | ( | X | ) | x_firstobj(x_restobj(x_restobj(x_base_field_heap_group(X)))) |
Get the heap free hook field. Value: atom with x_heap_free_fn_t pointer.
| #define x_base_field_heap_free_hooks | ( | X | ) | x_firstobj(x_restobj(x_restobj(x_restobj(x_restobj(x_base_field_heap_group(X)))))) |
Get the free-hooks list field. Value: a list of callables, each invoked once per sweep phase before objects are reclaimed. Extended at runtime via x_heap_free_hook_add().
| #define x_base_field_heap_group | ( | X | ) | x_firstobj(x_restobj(x_base_field_meta_group(X))) |
Get the heap group pair.
| #define x_base_field_heap_mark | ( | X | ) | x_firstobj(x_restobj(x_base_field_heap_group(X))) |
Get the heap mark hook field. Value: atom with x_heap_mark_fn_t pointer.
| #define x_base_field_heap_mark_hooks | ( | X | ) | x_firstobj(x_restobj(x_restobj(x_restobj(x_base_field_heap_group(X))))) |
Get the mark-hooks list field. Value: a list of callables, each invoked once per garbage collection mark phase (fan-out subscribers). Extended at runtime via x_heap_mark_hook_add() rather than reserved as a single fixed slot. The collector itself does not invoke the hooks (it has no callable-dispatch); the consuming layer walks the list and dispatches per its own conventions.
| #define x_base_field_heap_mark_roots | ( | X | ) | x_firstobj(x_restobj(x_restobj(x_restobj(x_restobj(x_restobj(x_base_field_heap_group(X))))))) |
Get the mark-roots list field. Value: a list of objects to mark on every collection (so they survive GC even when not reachable from the base tree or the root chain). Extended at runtime via x_heap_mark_root_add().
| #define x_base_field_heap_root_chain | ( | X | ) | x_firstobj(x_restobj(x_restobj(x_restobj(x_restobj(x_restobj(x_restobj(x_base_field_heap_group(X)))))))) |
Get the root-chain head field. Value: the most recently registered off-chain (stack- or static-storage) object, or nil. Registered objects link LIFO through the same x_obj_heap() header slot the allocation chain uses – with a different head, so any object is on exactly one of the two chains. The chain is marked on every collection (x_heap_root_chain_mark()) but never swept: x_heap_sweep() walks only the allocation chain. See x_heap_root_push() / x_heap_root_pop().
| #define x_base_field_obj_meta_extra | ( | X | ) | x_firstobj(x_base_field_heap_group(X)) |
Get the extra metadata units count field. Value: integer atom. When > 0, x_obj_alloc() prepends this many extra units before each object's standard metadata, accessible via x_obj_meta_i().