[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
Part1 - Part2 - Part3 - Part4 - Part5 - Single Page
Top Document: comp.unix.aix Frequently Asked Questions (Part 4 of 5)
Previous Document: 2.07: Why does it take so long to compile "hello world" with xlc?
Next Document: 2.09: Why does xlc complain about 'extern char *strcpy()'
-
Search the FAQ Archives
Part1 - Part2 - Part3 - Part4 - Part5 - Single Page
Top Document: comp.unix.aix Frequently Asked Questions (Part 4 of 5)
Previous Document: 2.07: Why does it take so long to compile "hello world" with xlc?
Next Document: 2.09: Why does xlc complain about 'extern char *strcpy()'
2.08: 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.
Top Document: comp.unix.aix Frequently Asked Questions (Part 4 of 5)
Previous Document: 2.07: Why does it take so long to compile "hello world" with xlc?
Next Document: 2.09: Why does xlc complain about 'extern char *strcpy()'
Part1 - Part2 - Part3 - Part4 - Part5 - Single Page
[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
Send corrections/additions to the FAQ Maintainer:
bofh@mail.teleweb.pt (Jose Pina Coelho)
Last Update October 22 2009 @ 05:22 AM