NAME

cxDataCalloc - allocate and clear space from IRIS Explorer data memory

C SPECIFICATION

#include <cx/DataOps.h>

void *cxDataCalloc(size_t nelem, size_t elsize)

FORTRAN SPECIFICATION

integer cxDataCalloc(nelem, elsize)
integer nelem, elsize

PARAMETERS

nelem
number of elements to be allocated.
elsize
size of each element.

FUNCTION RETURN VALUE

cxDataCalloc returns a pointer to the allocated storage, or NULL if insufficient storage is available.

DESCRIPTION

cxDataCalloc allocates space for an array of nelem elements of size elsize, from IRIS Explorer data memory. The space is initialized to zeros. Depending on machine architecture the space may be allocated from a shared memory arena. Otherwise space will be allocated from the module's normal data space.

Shared memory is a fixed resource, so it is possible for the allocation to fail if the shared memory is exhausted. When this happens, cxDataCalloc returns NULL, and a subsequent call to cxDataAllocErrorGet will return non-zero.

SEE ALSO

cxDataMalloc(3E), cxDataRealloc(3E), cxDataFree(3E), cxDataAllocErrorGet(3E)
Last modified: Mon Nov 18 13:47:48 GMT 1996
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1996