home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / programm / 5220 < prev    next >
Encoding:
Internet Message Format  |  1992-11-09  |  1.5 KB

  1. Path: sparky!uunet!ukma!darwin.sura.net!zaphod.mps.ohio-state.edu!cs.utexas.edu!natinst.com!natinst.com!not-for-mail
  2. From: nigeld@natinst.com (Nigel Dsouza)
  3. Newsgroups: comp.unix.programmer
  4. Subject: Standard Method of Handling/Detecting Out of Virtual Memory condition
  5. Date: 9 Nov 1992 13:36:50 -0600
  6. Organization: National Instruments, Austin, TX
  7. Lines: 26
  8. Message-ID: <1dmekiINN9ft@eagle.natinst.com>
  9. NNTP-Posting-Host: eagle.natinst.com
  10. Keywords: virtual memory, stack growth
  11.  
  12.  
  13. System: SunOS 4.x
  14.  
  15. Is there a system call to report on the amount of free Virtual memory?
  16.     
  17. Is there a method to reserve a specific amount of virtual memory for a 
  18. particular process? i.e. guarantee that a process can use a certain amount of
  19. memory without having to worry about running into an out of virtual memory
  20. problem.
  21.  
  22. I am not worried about dynamic memory (i.e. memory from malloc et all) because
  23. I can allocate that in advance to guarantee that memory; it is the memory 
  24. needed for the automatic growth of the stack that is a problem.  Specifically,
  25. the condition I would like to avoid is that the my process needs to grow its
  26. 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
  27. setrlimit to (X - EmergencyStackSpace), where X is the amount of stack space
  28. I would like to be guaranteed.  
  29.     
  30. I would appreciate any pointers to methods of handling out of virtual memory
  31. conditions.
  32.  
  33. Nigel D'Souza
  34.     
  35.  
  36.     
  37.  
  38.