fdds_malloc - allocate memory


SYNOPSIS

#include <fdds.h> (fixed-format sources)
#include <f90dds.h> (free-format sources)

pointer fdds_malloc(size)

integer size

DESCRIPTION

fdds_malloc allocates memory. If zero bytes are requested, then a NULL pointer is returned. The DDS memory routines allow for runtime memory checking. See standard man page for malloc(3).

The following DDS parameters are predefined for host-dependent Fortran values:

SIZEOF_INTEGER
SIZEOF_INTEGER2
SIZEOF_REAL
SIZEOF_DOUBLE
SIZEOF_COMPLEX
SIZEOF_DBL_CPX
    

SEE ALSO

fdds_malloc8 Allocate memory
fdds_calloc Allocate memory
fdds_calloc8 Allocate memory
fdds_realloc Reallocate memory
fdds_realloc8 Reallocate memory
fdds_free Free memory
fdds_memuse Query allocated memory
    

EXAMPLE

      integer reals
      real buf(*)
      pointer(ptr_buf, buf)
      
      ptr_buf = fdds_malloc(reals*SIZEOF_REAL)
      ...
      
      fdds_free(ptr_buf)
    

AUTHOR

R. L. Selzler, EPTG (Oct 1995)