Sun Java System Web Server 6.1 SP12 NSAPI Programmer's Guide

CALLOC

The CALLOC macro is a platform-independent substitute for the C library routine calloc. It allocates num*size bytes from the request’s memory pool. If pooled memory has been disabled in the configuration file (with the pool-init built-in SAF), PERM_CALLOC and CALLOC both obtain their memory from the system heap.

Syntax

void *CALLOC(int size)

Returns

A void pointer to a block of memory.

Parameters

int size is the size in bytes of each element.

Example

char *name;name = (char *) CALLOC(100);

See Also

FREE, REALLOC, STRDUP, PERM_MALLOC, PERM_FREE, PERM_REALLOC, PERM_STRDUP