INtime SDK Help
mpool_buffer_size
INtime SDK v7 > About INtime > Other system libraries > Heaps and memory pools > Memory pools > mpool_buffer_size

Returns the size of a buffer returned by mpool_alloc or mpool_realloc.

DWORD mpool_buffer_size(
    MPOOL pool, 
    void * buf
);

Parameters

pool
The memory pool created by mpool_create.
buf
The buffer created by mpool_alloc or mpool_realloc.

Remarks

Buffers always have a length of at least four and may be larger than the length requested by mpool_alloc or mpool_realloc.

Return Values

The buffer's size
Success.
0 (zero)
Failure. The function sets errno to one of these values:
EEXIST The pool is deleted.
EINVAL The pool is not a valid MPOOL.

Requirements

Versions Defined in Include Link to
INtime 4.0 intime/rt/include/mpool.h mpool.h clib.lib
   
See Also