mi_register_deferred_free

Register a deferred free function.

extern (C) @nogc @system nothrow
void
mi_register_deferred_free

Parameters

deferred_free const(mi_deferred_free_fun)

Address of a deferred free-ing function or NULL to unregister.

Some runtime systems use deferred free-ing, for example when using reference counting to limit the worst case free time. Such systems can register (re-entrant) deferred free function to free more memory on demand. When the force parameter is true all possible memory should be freed. The per-thread heartbeat parameter is monotonically increasing and guaranteed to be deterministic if the program allocates deterministically. The deferred_free function is guaranteed to be called deterministically after some number of allocations (regardless of freeing or available free memory). At most one deferred_free function can be active.

Meta