Reference: IVEShmCalloc

Overview

Dynamically allocates memory from an IVEArena and ensures that all bits in the allocated block are initialized to zero.

Prototype (C)

#include "ive_shm.h"
void* IVEShmCalloc(IVEArenaSize n_elem, IVEArenaSize el_sz, IVEArena arena);

Prototype (Fortran)

There is no Fortran interface.

Parameters

n_elem
n_elem is the number of elements to allocate.
el_sz
el_sz is the size of each element.
arena
arena is the arena on which to operate.

Return value

If unsuccessful, returns zero; otherwise, returns a pointer to a region sufficient for storage of at least n_elem * el_sz bytes. The initial location of the region is aligned for storage of any intrinsic or compound type. The contents of the region are initialized so all bits are zero. When the allocated region is no longer needed, it may be recycled with IVEShmDealloc.

Cross references

IVEShmAlloc, IVEShmDealloc, IVEArena, and IVEArenaSize.


| categories | alphabetical |


modified July 1, 2001

Eric Branlund (eric@msg.ucsf.edu)