shpalloc(3F)

SHPALLOC - Allocates a block of memory from the symmetric heap

As shipped in IRIX 6.5.19. Added in IRIX 6.5.19.

NAME
     SHPALLOC - Allocates a block of memory from the symmetric heap

SYNOPSIS
     POINTER (addr, A(1))
     INTEGER (length, errcode, abort)
     CALL SHPALLOC(addr, length, errcode, abort)

DESCRIPTION
     SHPALLOC allocates a block of memory from the program's symmetric heap
     that is greater than or equal to the size requested.  If the request
     cannot be satisfied from the free blocks currently in the heap, it
     will try to allocate more memory from the system.  To maintain
     symmetric heap consistency, all PEs in an program must call SHPALLOC
     with the same value of length; if any processing elements (PEs) are
     missing, the program will hang.

     The SHPALLOC function accepts the following arguments:

     Argument       Description
     addr           First word address of the allocated block (output).
     length         Number of words of memory requested (input).  One word
                    is 32 bits.
     errcode        Error code is 0 if no error was detected; otherwise, it
                    is a negative integer code for the type of error
                    (output).
     abort          Abort code; nonzero requests abort on error; 0 requests
                    an error code (input).

     By using the Fortran POINTER mechanism in the following manner, you
     can use array A to refer to the block allocated by SHPALLOC:

          POINTER (addr, A(1))

RETURN VALUES
     Error conditions are as follows:

     Error Code     Condition
           -1       Length is not an integer greater than 0.
           -2       No more memory is available from the system (checked if
                    the request cannot be satisfied from the available
                    blocks on the symmetric heap).

SEE ALSO
     intro_shmem(3), shmalloc(3F), shpclmove(3F), shpdeallc(3F)