aglMallocEx

Requests a specified amount of memory for use as a new data array.

voidp aglMallocEx(
  size_t numbytes
  const char *filename
  );

Parameters

numbytes
The number of bytes to be allocated.

filename
The path to a file to be used as a backing store for the requested memory block.

Return Value

Returns a void pointer to the memory block allocated, or NULL if available memory is not sufficient.

Remarks

Array Visualizer treats the allocated memory as a one-dimensional array whose elements are of type AGL_UCHAR. To change the structure or data type, call aglReshape. If filename is an existing .AGL file, the array data comes from that file.

The caller should eventually deallocate the memory by calling aglFree.

For large memory allocations the advantages of using aglMallocEx, instead of aglMalloc, are that memory is not allocated from the paging store, and the system periodically synchronizes the memory and disk images.

See Also

aglFree, aglMalloc, aglReshape