Next: , Previous: , Up: Hierarchical Resource Allocation Manager Functions   [Index] x1f4_pick_e4lf

extern int x1f4_pick_e4lf
    (void *e4ll, void ***text, int (*clear)(void *, void *), unsigned size,
     void **address);

The x1f4_link_e4ll function allocates a memory segment, at least size large and stores its start address at address. It registers the clear method to be called with the execution context pointer and the collection hint stored at text as arguments, in this order, just before the allocated memory is reclaimed. The allocation is done against the previous memory allocation context/scope recorded with the e4ll hierarchical resource allocation manager.

NB The existence of a previous memory allocation context is assumed, it is not checked.

The memory allocation context will become current once the current one expires. The function is suited for registration of function return temporaries.

The function returns 0 for success, one of the defined error codes for failure.

See Temporaries Allocator Construct.

For temporaries registration against the current context, the temporary recorder described by the x1f4_copy_e4ll function is to be used.

See x1f4_copy_e4ll.