# PetscSegBufferCreate
create a segmented buffer 
## Synopsis
```
PetscErrorCode PetscSegBufferCreate(size_t unitbytes, size_t expected, PetscSegBuffer *seg)
```
Not Collective


## Input Parameters

- ***unitbytes -*** number of bytes that each entry will contain
- ***expected -*** expected/typical number of entries



## Output Parameter

- ***seg -*** segmented buffer object





## See Also
 `PetscSegBufferGet()`, `PetscSegBufferExtractAlloc()`, `PetscSegBufferExtractTo()`, `PetscSegBufferExtractInPlace()`, `PetscSegBufferDestroy()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/utils/segbuffer.c.html#PetscSegBufferCreate">src/sys/utils/segbuffer.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/utils/segbuffer.c)


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