PetscMemorySetGetMaximumUsage — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# PetscMemorySetGetMaximumUsage

Tells PETSc to monitor the maximum memory usage so that `PetscMemoryGetMaximumUsage()` will work.

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscMemorySetGetMaximumUsage(void)

Not Collective

## Options Database Key

- -memory_view - Print memory usage at end of run

- -log_view_memory - Print memory information per event

- -malloc_view - Print usage of `PetscMalloc()` in `PetscFinalize()`

## See Also

`PetscMallocGetMaximumUsage()`, `PetscMemoryGetCurrentUsage()`, `PetscMallocGetCurrentUsage()`, `PetscMemoryGetMaximumUsage()`

## Level

intermediate

## Location

src/sys/memory/mem.c

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages