petsc-3.14.5 2021-03-03
Report Typos and Errors

# PetscMemzero

Zeros the specified memory.

### Synopsis

    PETSC_STATIC_INLINE PetscErrorCode PetscMemzero(void *a,size_t n)

Not Collective

### Input Parameters

| a | - pointer to beginning memory location
| n | - length (in bytes) of memory to initialize

### Compile Option

PETSC_PREFER_BZERO - on certain machines (the IBM RS6000) the bzero() routine happens to be faster than the memset() routine. This flag causes the bzero() routine to be used.

Not available from Fortran Prefer PetscArrayzero()

Developer Note: this is inlined for fastest performance

### See Also

PetscMemcpy(), PetscMemcmp(), PetscArrayzero(), PetscArraycmp(), PetscArraycpy(), PetscMemmove(), PetscStrallocpy()

### Level

intermediate

### Location

include/petscsys.h

### Examples

src/sys/tutorials/ex5.c.html
src/ksp/ksp/tutorials/ex42.c.html
src/ksp/ksp/tutorials/ex43.c.html
src/ksp/ksp/tutorials/ex49.c.html
src/ksp/ksp/tutorials/ex70.c.html
src/snes/tutorials/ex48.c.html
src/ts/tutorials/ex9.c.html
src/ts/tutorials/ex10.c.html
src/ts/tutorials/ex11.c.html
src/ts/tutorials/ex14.c.html
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages