# PetscMallocGetDebug
Indicates what PETSc memory debugging it is doing. 
## Synopsis
```
#include "petscsys.h" 
PetscErrorCode PetscMallocGetDebug(PetscBool *basic, PetscBool *eachcall, PetscBool *initializenan)
```
Not Collective


## Output Parameters

- ***basic -*** doing basic debugging
- ***eachcall -*** checks the entire memory heap at each `PetscMalloc()`/`PetscFree()`
- ***initializenan -*** initializes memory with NaN





## Note
By default, the debug version always does some debugging unless you run with -malloc_debug no


## See Also
 `CHKMEMQ()`, `PetscMallocValidate()`, `PetscMallocSetDebug()`

## Level
intermediate

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


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


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
