Stats

Control and store the GC statistics.

This is the interface to this module, it has methods for the GC to inform when a relevant event has happened. The events are the start and finish of an allocation, when the world is stopped and restarted and when a collection is triggered and done.

All the data is logged in memory and printed to the standard output when requested (usually at the end of the program).

Members

Functions

collection_finished
void collection_finished()

Inform the end of a collection.

collection_started
void collection_started()

Inform the start of a collection.

finalize
void finalize()
Undocumented in source. Be warned that the author may not have intended to support it.
malloc_finished
void malloc_finished(void* ptr)

Inform the end of an allocation.

malloc_started
void malloc_started(size_t size, uint attr, size_t* ptrmap_bitmask)

Inform the start of an allocation.

world_started
void world_started()

Inform that all threads (the world) have been resumed.

world_stopped
void world_stopped()

Inform that all threads (the world) have been stopped.

Static functions

opCall
Stats opCall(.gc.GC* gc)

Construct a Stats object (useful for easy initialization).

See Also

CollectionInfo and MallocInfo structs.

Meta