INtime SDK Help
heap_validate_buffer
INtime SDK v6 > About INtime > Other system libraries > Heaps and memory pools > C/C++ Runtime heap > heap_validate_buffer

Determines whether the buffer address is valid and exists within the heap.

int heap_validate_buffer(
    void * buf
);

Parameters

buf
Pointer to a buffer created by calloc, malloc, or realloc.

Remarks

The value of buf passed to heap_validate_buffer() must be a value returned from calloc, malloc, or realloc. heap_validate_buffer() will fail for values of buf+n where n >= 1.

Return Values

0 (zero)
Success.
Less than 0 (zero)
Failure. The function sets errno to one of these values:
EACCES The buffer address does not exist within the process.
EINVAL The heap is not a valid MPOOL or the buffer does not belong to the heap.

Requirements

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

C library