Table of Contents
qalloc_malloc, qalloc_statmalloc, qalloc_dynmalloc - allocates memory
from the specified map
#include <qthread/qalloc.h>
void *
qalloc_malloc (void *map, size_t size);
void *
qalloc_statmalloc (struct mapinfo_s *map);
void *
qalloc_dynmalloc (struct dynmapinfo_s *map, size_t size);
These
are the allocation functions. They return a pointer to an allocated memory
block from the specified qalloc map. The qalloc_statmalloc() function only
needs a pointer to the map itself, as the size of the returned block is
the same for all allocations from that map. qalloc_dynmalloc() on the other
hand also takes a size argument, since by definition, a dynamic map allows
for any size allocation. qalloc_malloc() will use whichever of the other
two functions is appropriate for the map it is passed; however, if the
map is a static map, the size argument is ignored.
qalloc_cleanup(3)
,
qalloc_checkpoint(3)
, qalloc_free(3)
, qalloc_loadmap(3)
Table of Contents