petsc-3.12.5 2020-03-29
Report Typos and Errors

PetscFreeA

Free one or more objects, possibly allocated using coalesced malloc

Synopsis

#include "petscsys.h"   
PetscErrorCode PetscFreeA(int n,int lineno,const char *function,const char *filename,void *ptr0,...)
Not Collective

Input Parameters

n - number of objects to free (at least 1)
lineno - line number to attribute deallocation (typically __LINE__)
function - function to attribute deallocation (typically PETSC_FUNCTION_NAME)
filename - file name to attribute deallocation (typically __FILE__)
ptr0 ... - first of n pointers to free

Note

This function is not normally called directly by users, but rather via the macros PetscFree(), PetscFree2(), etc.

The pointers are zeroed to prevent users from accidently reusing space that has been freed.

See Also

PetscMallocAlign(), PetscMallocSet(), PetscMallocA(), PetscFree1(), PetscFree2(), PetscFree3(), PetscFree4(), PetscFree5(), PetscFree6(), PetscFree7()

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