:orphan: # PetscCalloc2 Allocates 2 cleared (zeroed) arrays of memory both aligned to `PETSC_MEMALIGN` ## Synopsis ``` #include PetscErrorCode PetscCalloc2(size_t m1,type **r1,size_t m2,type **r2) ``` Not Collective ## Input Parameters - ***m1 -*** number of elements to allocate in 1st chunk (may be zero) - ***m2 -*** number of elements to allocate in 2nd chunk (may be zero) ## Output Parameters - ***r1 -*** memory allocated in first chunk - ***r2 -*** memory allocated in second chunk ## See Also `PetscFree()`, `PetscNew()`, `PetscMalloc()`, `PetscCalloc1()`, `PetscMalloc2()` ## Level developer ## Location include/petscsys.h ## Examples src/ksp/ksp/tutorials/ex77.c
src/snes/tutorials/ex13.c
src/tao/tutorials/ex4.c
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscsys.h) [Index of all Sys routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)