What's with malloc()?
malloc() uses a late allocation algorithm based on 4.3 BSD's malloc()
for speed. This lets you allocate very large sparse memory spaces,
since the pages are not actually allocated until they are touched for
the first time. Unfortunately, it doesn't die gracefully in the face of
loss of available memory. See the "Paging Space Overview" under
InfoExplorer, and see the notes on the linker in this document for an
example of an ungraceful death.
If you want your program to get notified when running out of memory, you
should handle the SIGDANGER signal. The default is to ignore it.
SIGDANGER is sent to all processes when paging space gets low, and if
paging space gets even lower, processes with the highest paging space
usage are sent the SIGKILL signal.
malloc() is substantially different in 3.2, allocating memory more
tightly. If you have problems running re-compiled programs on 3.2,
try running them with MALLOCTYPE=3.1.
Early Page Space Allocation (EPSA) added to AIX 3.2: see
/usr/lpp/bos/README.PSALLOC - IX38211 / U422496 Allows setting of
early allocation (vs. default late allocation) on a per-process basis.