Guardian Native C Library Calls Reference Manual (G06.27+)

Guardian Native C Library Calls (g - i) heap_check_always(3)
NAME
heap_check_always - Controls whether the run-time heap consistency is checked automatically
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRESRL
G-series native OSS processes: /G/system/sysnn/zcresrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
H-series OSS processes: /G/system/zdllnnn/zcredll
SYNOPSIS
#include <stdlib.h>
void heap_check_always (
int switch);
PARAMETERS
switch Species whether to enable or disable automatic consistency checking of the
run-time heap. A nonzero value of switch enables automatic checking, and the
value zero disables automatic checking.
DESCRIPTION
The heap_check_always() function controls whether the memory-management functions cal-
loc(), free(), malloc(), and realloc() automatically check the consistency of the run-time heap.
When automatic consistency checking is enabled, the memory-management functions listed ear-
lier perform the consistency check by calling the heap_check() function. Consequently, an
inconsistency discovered by automatic checking has the same impact as one discovered by cal-
ling heap_check(). Enabling automatic consistency checking degrades the performance of heap
operations signicantly. Thus, you should disable automatic checking after developing and
debugging your application.
RELATED INFORMATION
Functions: heap_check(3), heap_min_block_size(3).
STANDARDS CONFORMANCE
The heap_check() function is an HP extension to the XPG4 Version 2 specication.
527192-004 Hewlett-Packard Company 351