memory_analyze
status.i4.v = memory_analyze(memory_info.s.r [,abort_on_fail.b.v])
This routine allows the caller to query the dynamic memory
allocation structures to see if they have been corrupted.
memory_info dynamic memory information (structure of type
MEMORY_DIAG_INFO) (If this information is not
needed, a null pointer can be passed.)
[abort_on_fail] if this argument is true memory_analyze will
call abort if a problem is detected. This
will generate a stack trace, that presumably
will aid in debugging the corrupted heap.
The default is false. You are on your own if
you set this to true in production code. It
is intended for use in test environments where
aborting the entire process is considered
an acceptable means of tracking down bug(s).
This function returns ACNET status values as follows:
CLIB_OK dynamic memory structures have not been
corrupted
CLIB_NOINIT memory diagnostics have not been
initialized
CLIB_CORRUPT dynamic memory structures have been corrupted
This function requires the following include files:
clib_memory_h, acnet_errors_h
Related functions:
memory_diagnostic_control_c, clib_malloc, clib_free, clib_calloc,
clib_realloc, clib_memory_block_length
C/C++ usage:
int status;
MEMORY_DIAG_INFO memory_info;
bool abort_on_fail = false;
status = memory_analyze(&memory_info,abort_on_fail);