INtime SDK Help
mpool_validate_buffer
INtime SDK v6 > About INtime > Other system libraries > Heaps and memory pools > Memory pools > mpool_validate_buffer

Determines whether the buffer address is valid and exists within a pool buffer.

BOOLEAN mpool_validate_buffer(
    MPOOL pool, 
    void * buf
);

Parameters

pool
The memory pool created by mpool_create.
buf
A pointer to a buffer created by mpool_alloc or mpool_realloc.

Remarks

The value of buf passed to mpool_validate_buffer() must be a value returned from mpool_alloc or mpool_ realloc. mpool_validate_buffer() will fail for values of buf+n where n >= 1.

Return Values

TRUE
Success. The buffer is valid.
FALSE
Failure. The function sets errno to one of these values:
EACCES The buffer address does not exist within the process.
EINVAL The pool is not a valid MPOOL or the buffer does not belong to the pool.

Requirements

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