astIsDynamic

Returns a flag indicating if memory was allocated dynamically

Description:

This function takes a pointer to a region of memory and tests if the memory has previously been dynamically allocated using other functions from this module. It does this by checking for the presence of a " magic" number in the header which precedes the allocated memory. If the magic number is not present (or the pointer is invalid for any other reason), zero is returned. Otherwise 1 is returned.

Synopsis

int astIsDynamic( const void ptr )

Parameters:

ptr
Pointer to test.

Returned Value

astIsDynamic()
Non-zero if the memory was allocated dynamically. Zero is returned if the supplied pointer is NULL.

Notes: