Allocate space that may be accessed from C and FORTRAN


This function allocates space in the same way as the standard C calloc() function, except that the pointer to the space allocated is automatically registered (using cnfRegp) for use from both C and FORTRAN. This means that the returned pointer may subsequently be converted into a FORTRAN pointer of type F77_POINTER_TYPE (using cnfFptr) and back into a C pointer (using cnfCptr). The contents of the space may therefore be accessed from both languages.


cpointer = cnfCalloc( nobj, size );


size_t nobj (Given)
The number of objects for which space is required.
size_t size (Given)
The size of each object.

Returned Value

void cnfCalloc
A registered pointer to the allocated space, or NULL if the space could not be allocated.