# PetscMallocGetCurrentUsage
gets the current amount of memory used that was allocated with `PetscMalloc()` 
## Synopsis
```
#include "petscsys.h" 
PetscErrorCode PetscMallocGetCurrentUsage(PetscLogDouble *space)
```
Not Collective


## Output Parameters

- ***space -*** number of bytes currently allocated





## See Also
 `PetscMallocDump()`, `PetscMallocGetMaximumUsage()`, `PetscMemoryGetCurrentUsage()`,
`PetscMemoryGetMaximumUsage()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/memory/mtr.c.html#PetscMallocGetCurrentUsage">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)  
