:orphan:
# VecSetPinnedMemoryMin
Set the minimum data size for which pinned memory will be used for host (CPU) allocations. 
## Synopsis
```
#include "petscvec.h"   
PetscErrorCode VecSetPinnedMemoryMin(Vec v, size_t mbytes)
```
Logically Collective


## Input Parameters

- ***v    -*** the vector
- ***mbytes -*** minimum data size in bytes



## Options Database Key

- ***-vec_pinned_memory_min <size> -*** minimum size (in bytes) for an allocation to use pinned memory on host.





## Note
Specifying -1 ensures that pinned memory will never be used.


## See Also
 [](ch_vectors), `Vec`, `VecGetPinnedMemoryMin()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/interface/vector.c.html#VecSetPinnedMemoryMin">src/vec/vec/interface/vector.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/vec/interface/vector.c)


[Index of all Vec routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
