petsc-3.7.1 2016-05-15
Report Typos and Errors

PetscMallocValidate

Test the memory for corruption. This can be used to check for memory overwrites.

Synopsis

#include "petscsys.h" 
PetscErrorCode  PetscMallocValidate(int line,const char function[],const char file[])

Input Parameter

line - line number where call originated. Many br
function - name of function calling Many br
file - file where function is Many br

Return value

The number of errors detected. Many br

Output Effect

Error messages are written to stdout. Many br

Many br

Notes

You should generally use CHKMEMQ as a short cut for calling this Many brroutine. Many br

The line, function, file are given by the C preprocessor as Many br__LINE__, __FUNCT__, __FILE__ Many br

The Fortran calling sequence is simply PetscMallocValidate(ierr) Many br

No output is generated if there are no problems detected. Many br

See Also

CHKMEMQ

Level:advanced
Location:
src/sys/memory/mtr.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages