Previous: Temporaries Allocator Construct, Up: Generic Constructs [Index]
The consolidated disposal manager construct is the libaime preferred interface to the consolidated object disposal mechanism in use.
Consolidated disposal is the (often faster) alternative to the default immediate disposal policy.
The libaime consolidated disposal implies a set of objects managing the disposal. They record the objects that make the subject of consolidated disposal and run the objects disposal proper.
The libaime executive objects that are able to observe the in use consolidated disposal policy refer the disposal managers by the consolidated disposal manager construct interface.
When objects become susceptible of consolidated disposal, they are referred to the disposal managers. Additionally, when objects are finally destroyed the consolidated disposal managers are notified.
See Consolidated Disposal Mechanics.
the consolidated disposal context is some pointer passed as first argument to the consolidated disposal methods
It is declared as:
void *text;
the object registrar is the method by which objects are registered with the consolidated disposal scheme.
It is declared as:
int (*miss)(void *, struct x1f4_nodelink_type **, struct x1f4_nodelink_type *);
It is passed the consolidated disposal context, the
struct x1f4_nodelink_type
cycle dismantling objects list and the address
of the struct x1f4_nodelink_type
record identifying the object to be
registered as arguments, in this order.
See struct x1f4_nodelink_type.
See Cycle Dismantling.
The method may attempt an immediate object disposal if it deems such a disposal inexpensive. If it does it will observe the cycle dismantling objects list.
The method is expected to return 0
for success, non zero for failure.
the non recursive object registrar is the non recursive method by which objects
are registered with the consolidated disposal scheme. It is observed by non
recursive collectors (such as the pick
reference remover in the
struct x1f4_nodetype_type
data type definition).
See struct x1f4_nodetype_type.
It is declared as:
int (*fine)(void *, struct x1f4_nodelink_type **, struct x1f4_nodelink_type *);
Its call interface is the same as for the miss
object registrar.
The method is expected to return 0
for success, non zero for failure.
the object redeemer is the method removing objects from the consolidated disposal scheme. It is called (most often) from the inside the consolidated disposal proper, when the object destruction is triggered. It is called by the executive objects that manage the life cycle of objects, such as library objects managing aime visible objects (e.g. the list library objects for ‘list’ objects).
See Libraries.
See List Library.
It is declared as:
int (*call)(void *, struct x1f4_nodelink_type *);
It is passed the consolidated disposal context and the address of the
struct x1f4_nodelink_type
record identifying the object to be
unregistered as arguments, in this order.
The method is expected to return 0
for success, non zero for failure.
Previous: Temporaries Allocator Construct, Up: Generic Constructs [Index]