.TH MA_ALLOCATE_HEAP 3 "20 February 1997" "MA Release 1.8" "MA LIBRARY ROUTINES" .SH NAME MA_allocate_heap - allocate a heap block .SH "C SYNOPSIS" .nf #include "macdecls.h" Boolean MA_allocate_heap(datatype, nelem, name, memhandle) Integer datatype; /* read-only */ Integer nelem; /* read-only */ char *name; /* read-only */ Integer *memhandle; /* write-only */ .fi .SH "FORTRAN SYNOPSIS" .nf #include "mafdecls.fh" logical function MA_allocate_heap(datatype, nelem, name, memhandle) integer datatype integer nelem character*(*) name integer memhandle .fi .SH DESCRIPTION MA_allocate_heap() allocates a heap block large enough to hold .I nelem elements of type .I datatype and associates .I name with the block for debugging purposes. A handle for the block is returned in .IR memhandle . .\" .SH USAGE .SH DIAGNOSTICS block '%s', MA not yet initialized .in +0.5i MA_init() must be called before this routine is called. .in block '%s', invalid datatype: %d .in +0.5i .I datatype must be one of those listed in macdecls.h or mafdecls.fh. .in block '%s', invalid nelem: %d .in +0.5i .I nelem must be greater than zero. .in block '%s', not enough space to allocate %d bytes .in +0.5i Recovery may be attempted by deallocating unneeded blocks and resubmitting the request, or the application may be rewritten to request more memory initially in the call to MA_init(). .in .SH "RETURN VALUE" C: MA_TRUE upon success, MA_FALSE upon failure. .br FORTRAN: .true. upon success, .false. upon failure. .\" .SH NOTES .SH FILES .nf Include files: /msrc/proj/hpctools/ma/release/current/include Library: /msrc/proj/hpctools/ma/release/current/lib/\fIplatform\fR/libma.a Man pages: /msrc/proj/hpctools/ma/release/current/man/man3 Source code: /msrc/proj/hpctools/ma/release/current/tar/ma\fIrelease\fR.tar .fi .SH "SEE ALSO" .na MA(3), MA_alloc_get(3), MA_free_heap(3), MA_get_index(3), MA_get_pointer(3), MA_inquire_avail(3), MA_inquire_heap(3) .ad .SH AUTHOR Gregory S. Thomas, Pacific Northwest National Laboratory