Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
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 and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycredll
SYNOPSIS
#include <stdlib.h>
void heap_check_always (
int switch);
PARAMETERS
switch Specifies whether to enable or disable automatic consistency checking of the
run-time heap. A value of 0 (zero) for switch disables automatic checking. A
value of 1 for switch enables automatic checking. The native CRE
heap_check_always() function also accepts a value of 2 for the switch variable
and treats it as if it were a value of 1.
DESCRIPTION
The heap_check_always() function controls whether the memory-management functions
calloc(), 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 significantly. 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_always() function is an HP extension to the XPG4 Version 2 specification.
527192-018 Hewlett-Packard Company 3−83