petsc-3.11.2 2019-05-18
Report Typos and Errors

PetscMallocA

Allocate and optionally clear one or more objects, possibly using coalesced malloc

Synopsis

#include "petscsys.h"   
PetscErrorCode PetscMallocA(int n,PetscBool clear,int lineno,const char *function,const char *filename,size_t bytes0,void *ptr0,...)
Not Collective

Input Parameters

n - number of objects to allocate (at least 1)
clear - use calloc() to allocate space initialized to zero
lineno - line number to attribute allocation (typically __LINE__)
function - function to attribute allocation (typically PETSC_FUNCTION_NAME)
filename - file name to attribute allocation (typically __FILE__)
bytes0 - first of n object sizes

Output Parameters

ptr0 -first of n pointers to allocate

Notes

This function is not normally called directly by users, but rather via the macros PetscMalloc1(), PetscMalloc2(), or PetscCalloc1(), etc.

See Also

PetscMallocAlign(), PetscMallocSet(), PetscMalloc1(), PetscMalloc2(), PetscMalloc3(), PetscMalloc4(), PetscMalloc5(), PetscMalloc6(), PetscMalloc7(), PetscCalloc1(), PetscCalloc2(), PetscCalloc3(), PetscCalloc4(), PetscCalloc5(), PetscCalloc6(), PetscCalloc7(), PetscFreeA()

Level

developer

Location

src/sys/memory/mal.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages