darena_t — dmalloc API manual page

NAME | SYNOPSIS | DESCRIPTION | NOTES

darena_t                    dmalloc API types manual                    darena_t

NAME         top

        darena_t - memory arena.

SYNOPSIS         top


        #include "dmalloc.h"

        typedef void darena_t;

DESCRIPTION         top

        The dmalloc(), dfree(), dcalloc(), drealloc() and dreallocarray()
        functions are designed to work both on the heap and in arenas. In the
        context of the dmalloc allocator, an arena is any memory region
        initialized by the darenainit() function. Initialization is required for
        the allocator functions to properly manage the memory. Thus, pointers to
        type darena_t are used in the allocator functions signatures to signal
        that they require a pointer to some backing memory that has been 
        initialized by darenainit().

        All of the allocator functions can receive NULL as a value for their 
        argument(s) of type darena_t *. Apart from the darenadestroy() function,
        that just does nothing in such case, the other allocator functions shall
        perform their tasks on the heap upon receiving a NULL darena_t pointer.

NOTES         top

        The type darena_t serves no purpose apart from being used, in the form
        of pointers to it, in the allocator functions signatures, for the reason
        explained in the DESCRIPTION.
dmalloc API types manual           2026-04-13                           darena_t