PetscNew#
Allocates memory of a particular type, zeros the memory! Aligned to PETSC_MEMALIGN
Synopsis#
#include <petscsys.h>
PetscErrorCode PetscNew(type **result)
Not Collective
Output Parameter#
result - memory allocated, sized to match pointer type
See Also#
PetscFree()
, PetscMalloc()
, PetscCalloc1()
, PetscMalloc1()
Level#
beginner
Location#
Examples#
src/ts/tutorials/ex10.c
src/ts/utils/dmplexlandau/tutorials/ex2.c
src/ts/tutorials/ex9.c
src/ts/tutorials/extchemfield.c
src/ts/tutorials/ex11.c
src/ts/tutorials/ex14.c
src/ts/tutorials/ex18.c
src/ts/tutorials/ex35.cxx
src/ts/tutorials/ex8.c
src/ts/tutorials/ex11_sa.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages