# PetscMemmove
Copies n bytes, beginning at location b, to the space beginning at location a. Copying  between regions that overlap will take place correctly. Use `PetscMemcpy()` if the locations do not overlap 
## Synopsis
```
static inline PetscErrorCode PetscMemmove(void *a, const void *b, size_t n)
```
Not Collective


## Input Parameters

- ***b -*** pointer to initial memory space
- ***a -*** pointer to copy space
- ***n -*** length (in bytes) of space to copy





## Notes
`PetscArraymove()` is preferred

This routine is analogous to `memmove()`.


## Developers Note
This is inlined for performance


## See Also
 `PetscMemcpy()`, `PetscMemcmp()`, `PetscArrayzero()`, `PetscMemzero()`, `PetscArraycmp()`, `PetscArraycpy()`, `PetscStrallocpy()`,
`PetscArraymove()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscsys.h.html#PetscMemmove">include/petscsys.h</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscsys.h)


[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)  
