:orphan:
# PetscFreeA
Free one or more memory locations, 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





## Notes
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 accidentally reusing space that has been freed.


## See Also
 `PetscMallocAlign()`, `PetscMallocSet()`, `PetscMallocA()`, `PetscFree1()`, `PetscFree2()`, `PetscFree3()`, `PetscFree4()`, `PetscFree5()`, `PetscFree6()`, `PetscFree7()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/memory/mal.c.html#PetscFreeA">src/sys/memory/mal.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/memory/mal.c)


[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)  
