NeXusDataFormat  1
NeXusCAPI
 All Functions Groups
Functions
Memory allocation
C API

Functions

NXstatus NXmalloc (void **data, int rank, const int dimensions[], int datatype)
 Utility function which allocates a suitably sized memory area for the dataset characteristics specified.
NXstatus NXfree (void **data)
 Utility function to release the memory for data.

Detailed Description


Function Documentation

NXstatus NXfree ( void **  data)

Utility function to release the memory for data.

Parameters:
dataA pointer to a pointer to free.
Returns:
NX_OK on success, NX_ERROR in the case of an error.
NXstatus NXmalloc ( void **  data,
int  rank,
const int  dimensions[],
int  datatype 
)

Utility function which allocates a suitably sized memory area for the dataset characteristics specified.

Parameters:
dataA pointer to a pointer which will be initialized with a pointer to a suitably sized memory area.
rankthe rank of the data.
dimensionsAn array holding the size of the data in each dimension.
datatypeThe NeXus data type of the data.
Returns:
NX_OK when allocation succeeds, NX_ERROR in the case of an error.