next up previous contents index
Next: 7.7.11 fs_free: Free a Up: 7.7 Dependencies on the Previous: 7.7.9 fs_malloc: Allocate memory

7.7.10 fs_realloc: Resize a chunk of allocated memory

 

SYNOPSIS

#include <oskit/fs/fs.h>

void *fs_realloc(void *curaddr, oskit_u32_t newsize);

DIRECTION

filesystem library tex2html_wrap_inline32841 client OS

DESCRIPTION

This function resizes the chunk of allocated memory referenced by curaddr to be at least newsize bytes, and returns a pointer to the new chunk. If successful, the old chunk is freed.

The client operating system need not provide any alignment guarantees for the new chunk of memory.

PARAMETERS

curaddr
The address of the old chunk.
newsize
The new size in bytes.

RETURNS

Returns a pointer to the new chunk of memory, or NULL on error.



University of Utah Flux Research Group