Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Dynamic Memory Allocation Macros
[Memory Functions and Macros]

Detailed Description

phDALLOC macros : Dynamic ALLOC (ptr,size,nelems,typecast) Allocate if memory is needed..

These macros take a size parameter to store the currently allocated size of the memory segment. It then checks for how much is being requested and only resizes if necessary.

All the phDALLOC macros take the same arguments but have slightly different behaviours. The argument list is the following:

phFree should be used with the phDALLOC_* mempointer pointer variable since the macros allocate and resize memory using phCalloc, phMalloc and phRealloc.


#define phDALLOC(ptr, cursize, nelems, cast)
#define phDALLOC_GROW(ptr, cursize, nelems, cast)
#define phDALLOC_RESIZE(ptr, cursize, nelems, cast)
#define phDALLOC_SIZE(ptr, cursize, newsize, cast)
#define phDALLOC_QUIET_VOIDRETURN(ptr, cursize, nelems, cast)

Copyright (C) 2002 - 2007 Philip D.S. Thoren ( )
University Of Massachusetts at Lowell
Robotics Lab Logo

Generated on Sat Jun 16 02:45:28 2007 for phission by  doxygen 1.4.4