Skip to main content
`Ctrl`+`K`

# PetscCheckPointer

Returns `PETSC_TRUE` if a pointer points to accessible data

## Synopsis

    PetscBool PetscCheckPointer(const void *ptr, PetscDataType dtype)

Not Collective, No Fortran Support

## Input Parameters

- ptr - the pointer

- dtype - the type of data the pointer is suppose to point to

## Notes

This is a non-standard PETSc function in that it returns the result and does not return an error code.

This function always returns true when running under Valgrind, or when compiled with asan options.

## See Also

`PetscCheckPointerSetIntensity()`

## Level

developer

## Location

src/sys/error/checkptr.c

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