next up previous contents index
Next: 11.4.6 alloc_gen: Allocate a Up: 11.4 Memory Interface Previous: 11.4.4 free: Free a

11.4.5 getsize: Inquire about the size of a chunk of memory

 

SYNOPSIS

#include <oskit/com/mem.h>

oskit_u32_t oskit_mem_getsize(oskit_mem_t *m, void *ptr);

DESCRIPTION

Return the size of the chunk of memory pointed to by ptr. The chunk must have been allocated with OSKIT_MEM_AUTO_SIZE for the size to be determined. The returned size may be greater than the original size requested, because of rounding done to satisfy alignment constraints.

PARAMETERS

m
The memory object to operate on.
ptr
The chunk to inquire about.

RETURNS

Returns the size of the chunk, or an undefined value if the chunk was not allocated with OSKIT_MEM_AUTO_SIZE.



Utah Flux Research Group