PetscCalloc#
Allocates a cleared (zeroed) memory region aligned to PETSC_MEMALIGN
Synopsis#
#include <petscsys.h>
PetscErrorCode PetscCalloc(size_t m,void **result)
Not Collective
Input Parameter#
m - number of bytes to allocate
Output Parameter#
result - memory allocated
Notes#
Memory is always allocated at least double aligned. This macro is useful in allocating memory pointed by void pointers
It is safe to allocate size 0 and pass the resulting pointer to PetscFree()
.
See Also#
Level#
beginner
Location#
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages