PetscSegBufferExtractAlloc — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# PetscSegBufferExtractAlloc

extract contiguous data to new allocation and reset segmented buffer

## Synopsis

    PetscErrorCode PetscSegBufferExtractAlloc(PetscSegBuffer seg, void *contiguous)

Not Collective, No Fortran Support

## Input Parameter

- seg - `PetscSegBuffer` buffer

## Output Parameter

- contiguous - address of new array containing contiguous data, caller frees with `PetscFree()`

## Developer Notes

‘seg’ argument is a pointer so that implementation could reallocate, though this is not currently done

## See Also

`PetscSegBufferCreate()`, `PetscSegBufferGet()`, `PetscSegBufferDestroy()`, `PetscSegBufferExtractTo()`, `PetscSegBufferExtractInPlace()`, `PetscSegBuffer`

## Level

developer

## Location

src/sys/utils/segbuffer.c

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