Table of Contents

Name

qalloc_malloc, qalloc_statmalloc, qalloc_dynmalloc - allocates memory from the specified map

Synopsis

#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);

Description

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.

See Also

qalloc_cleanup(3) , qalloc_checkpoint(3) , qalloc_free(3) , qalloc_loadmap(3)


Table of Contents