Sun Java System Web Server 7.0 Update 4 NSAPI Developer's Guide

FREE() Macro

The FREE macro is a platform-independent substitute for the C library routine free. It deallocates the space previously allocated by MALLOC, CALLOC, or STRDUP from the request’s memory pool.

Note –

Calling FREE for a block that was allocated with PERM_MALLOC, PERM_CALLOC, or PERM_STRDUP will not work.


FREE(void *ptr);

Return Values



void *ptr is a (void *) pointer to a block of memory. If the pointer is not the one created by MALLOC, CALLOC, or STRDUP, the behavior is undefined.


char *name;
name = (char *) MALLOC(256);

See Also

CALLOC() Macro, MALLOC() Macro, REALLOC() Macro, STRDUP() Macro, PERM_FREE() Macro