|
x-engine-c v0.2.13
The C engine for x-lang
|
Object-allocation accounting (the meta group's alloc element). More...
Macros | |
| #define | x_base_field_alloc_group(X) x_firstobj(x_restobj(x_restobj(x_base_field_meta_group(X)))) |
| #define | x_base_field_alloc_count(X) x_firstobj(x_base_field_alloc_group(X)) |
| #define | x_base_field_alloc_limit(X) x_firstobj(x_restobj(x_base_field_alloc_group(X))) |
| #define | x_base_field_alloc_error(X) x_firstobj(x_restobj(x_restobj(x_base_field_alloc_group(X)))) |
Object-allocation accounting (the meta group's alloc element).
Maintained by x_obj_alloc / x_obj_free in every build: allocation-layer state, not part of X_HEAP garbage collection.
| #define x_base_field_alloc_count | ( | X | ) | x_firstobj(x_base_field_alloc_group(X)) |
Get the allocated object-count field. Value: integer atom. Incremented by x_obj_alloc and decremented by x_obj_free: the number of objects currently allocated (counted once the base is set, so the base tree itself is excluded).
| #define x_base_field_alloc_error | ( | X | ) | x_firstobj(x_restobj(x_restobj(x_base_field_alloc_group(X)))) |
Get the allocation trip-message field. Value: an atom whose string is reported (via the error hook, or stderr once latched) when the ceiling trips, or nil to stop without reporting. Supplied by the embedding layer when it arms the limit – x-expr itself holds no message text.
| #define x_base_field_alloc_group | ( | X | ) | x_firstobj(x_restobj(x_restobj(x_base_field_meta_group(X)))) |
Get the alloc group list (count, limit, error).
| #define x_base_field_alloc_limit | ( | X | ) | x_firstobj(x_restobj(x_base_field_alloc_group(X))) |
Get the allocation ceiling field. Value: integer atom. 0 = unlimited (the default). When > 0, x_obj_alloc stops the process rather than allocate past it – the runaway-memory guard. Negative values are reserved: the allocator latches the cell to -1 once tripped.