Debug¶
Import: import system;
Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.
Debug¶
Allocator introspection for tests and diagnostics.
ref_count¶
Returns the current strong reference count of o for debugging.
runtime_counter¶
Opt-in attribution (DREAM_RUNTIME_COUNTERS=1); ids follow dream_ownership.h. Ordinary builds and unknown ids read as 0. Ids 11, 12 and 13 instead read the native heap's committed, live and free-listed bytes in every build by walking the heap, so each read costs time proportional to the heap size; WebAssembly builds read 0.
free_list_head¶
Memory-reuse probe that changes when the allocator frees storage. Release builds do not track frees and always read 0.
heap_ptr¶
Current heap address exposed for debugging.
live_objects¶
Number of currently live managed allocations. Only debug builds count allocations; release builds always read 0.
total_allocations¶
Total number of managed allocations made so far. Only debug builds count allocations; release builds always read 0.