Subject: Standard Method of Handling/Detecting Out of Virtual Memory condition
Date: 9 Nov 1992 13:46:48 -0600
Organization: National Instruments, Austin, TX
Lines: 24
Message-ID: <1dmf78INNaim@eagle.natinst.com>
NNTP-Posting-Host: eagle.natinst.com
Keywords: virtual memory, stack growth
System: SunOS 4.x
Is there a system call to report on the amount of free Virtual memory?
Is there a method to reserve a specific amount of virtual memory for a
particular process? i.e. guarantee that a process can use a certain amount of
memory without having to worry about running into an out of virtual memory
problem.
I am not worried about dynamic memory (i.e. memory from malloc et all) because
I can allocate that in advance to guarantee that memory; it is the memory
needed for the automatic growth of the stack that is a problem. Specifically,
the condition I would like to avoid is that the my process needs to grow its
stack, but cannot because it cannot get another page because the system is out of virtual memory. I would like to be able to set the "soft" limit, using
setrlimit to (X - EmergencyStackSpace), where X is the amount of stack space
I would like to be guaranteed.
I would appreciate any pointers to methods of handling out of virtual memory