MA_ALLOCATE_HEAP(3)

NAME
MA_allocate_heap - allocate a heap block

C SYNOPSIS
#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 */

FORTRAN SYNOPSIS
#include "mafdecls.fh"
logical function MA_allocate_heap(datatype, nelem, name, memhandle)
    integer     datatype
    integer     nelem
    character*(*) name
    integer     memhandle

DESCRIPTION
MA_allocate_heap() allocates a heap block large enough to hold nelem elements of type datatype and associates name with the block for debugging purposes. A handle for the block is returned in memhandle.

DIAGNOSTICS
block '%s', MA not yet initialized
MA_init() must be called before this routine is called.
block '%s', invalid datatype: %d
datatype must be one of those listed in macdecls.h or mafdecls.fh.
block '%s', invalid nelem: %d
nelem must be greater than zero.
block '%s', not enough space to allocate %d bytes
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().

RETURN VALUE
C: MA_TRUE upon success, MA_FALSE upon failure.
FORTRAN: .true. upon success, .false. upon failure.

FILES
Include files: /msrc/proj/hpctools/ma/release/current/include
Library:       /msrc/proj/hpctools/ma/release/current/lib/platform/libma.a
Man pages:     /msrc/proj/hpctools/ma/release/current/man/man3
Source code:   /msrc/proj/hpctools/ma/release/current/tar/marelease.tar

SEE ALSO
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)

AUTHOR
Gregory S. Thomas, Pacific Northwest National Laboratory