petsc-3.3-p7 2013-05-11

PetscMalloc2

Allocates 2 chunks of memory both aligned to PETSC_MEMALIGN

Synopsis

PetscErrorCode PetscMalloc2(size_t m1,type, t1,void **r1,size_t m2,type t2,void **r2)
Not Collective

Input Parameter

m1 - number of elements to allocate in 1st chunk (may be zero)
t1 - type of first memory elements
m2 - number of elements to allocate in 2nd chunk (may be zero)
t2 - type of second memory elements

Output Parameter

r1 - memory allocated in first chunk
r2 - memory allocated in second chunk

See Also

PetscFree(), PetscNew(), PetscMalloc()

Level:developer
Location:
include/petscsys.h
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/sys/sf/examples/tutorials/ex1.c.html
src/mat/examples/tutorials/ex17.c.html
src/ksp/ksp/examples/tutorials/ex4.c.html
src/snes/examples/tutorials/ex62.c.html
src/ts/examples/tutorials/ex14.c.html