petsc-3.7.1 2016-05-15
Report Typos and Errors

# PetscMalloc2

Allocates 2 arrays of memory both aligned to PETSC_MEMALIGN

### Synopsis

    #include <petscsys.h>
    PetscErrorCode PetscMalloc2(size_t m1,type **r1,size_t m2,type **r2)

Not Collective Many br

### Input Parameter

| m1 | - number of elements to allocate in 1st chunk (may be zero) Many br
| m2 | - number of elements to allocate in 2nd chunk (may be zero) Many br

### Output Parameter

| r1 | - memory allocated in first chunk Many br
| r2 | - memory allocated in second chunk Many br

Many br

### See Also

PetscFree(), PetscNew(), PetscMalloc(), PetscMalloc1(), PetscCalloc2()

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/vec/is/sf/examples/tutorials/ex1.c.html
src/mat/examples/tutorials/ex17.c.html
src/ksp/ksp/examples/tutorials/ex4.c.html
src/ts/examples/tutorials/ex11.c.html
src/ts/examples/tutorials/ex14.c.html