Memory allocation functions.
#include <ncarg/hlu/hlu.h> void *NhlMalloc( unsigned int size ) void *NhlRealloc( void *data, unsigned int size ) NhlErrorTypes NhlFree( void *data )
Type name: NhlTErrorTypes Definition: typedef enum _NhlErrType{ NhlFATAL = -4, /* "FATAL" */ NhlWARNING = -3, /* "WARNING" */ NhlINFO = -2, /* "INFO" */ NhlNOERROR = -1 /* "NOERROR" */ } NhlErrorTypes;
NhlMalloc returns a pointer to a block of memory of at least size bytes. The argument to NhlFree is a pointer to a block previously allocated with NhlMalloc. If NhlMalloc is called with a size of 0, it returns NULL.
NhlFree frees the memory pointed at by data so the memory can be re-used. NhlFree must be called on all memory allocated by the HLU library on behalf of the user. This includes all arrays retrieved from objects using NhlGetValues. If NhlFree is called with a NULL pointer, it doesn't work.
NhlRealloc changes the size of the block of memory pointed at by data. It may extend the current block or allocate another block, copy the contents pointed at by data to the new location, and then free the old block. It returns a pointer to the new block. If data is NULL, NhlRealloc behaves like NhlMalloc.
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?