home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / linux / 25743 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.7 KB  |  38 lines

  1. Newsgroups: comp.os.linux
  2. From: jaggy@purplet.demon.co.uk (Mike Jagdis)
  3. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!elroy.jpl.nasa.gov!ames!agate!doc.ic.ac.uk!pipex!demon!purplet!jaggy
  4. Subject: Re: Freeze up on X
  5. Organization: FidoNet node 2:252/305 - The Purple Tentacle, Reading
  6. Date: Tue, 26 Jan 1993 21:43:00 +0000
  7. Message-ID: <72.2B65BF2C@purplet.demon.co.uk>
  8. Sender: usenet@demon.co.uk
  9. Lines: 27
  10.  
  11. * In message, <FOX.93Jan23083823@graphics.nyu.edu>, David Fox said:
  12.  
  13. DF> The real allocation occurs when the allocated pages are written
  14. DF> to, and there is no equivalent to malloc returning NULL when
  15. DF> there is insufficient memory to allocate a page.
  16.  
  17. I believe AIX 3.1 uses the same type of delayed page allocation and 
  18. introduced a new signal, SIGDANGER, which is sent to processes that allocate 
  19. pages after the free pool falls below a certain threshold.
  20.  
  21.   Of course, programs would need to be written to handle SIGDANGER but 
  22. perhaps a fair bit could be gained by having the malloc library module 
  23. handle it unless otherwise overridden? Just have malloc register a handler 
  24. on first invocation if none already exists. When the handler is triggered it 
  25. searches for pages which are completely unused and unmaps them. The 
  26. effectiveness is, of course, dependent on fragmentation.
  27.  
  28.   It would be nice to have processes killed on memory exhaustion too though. 
  29. I've had g++ go completely awol before now. Adding swap wasn't a good idea, 
  30. I gave it 70Mb before I realised that!
  31.  
  32.   (Incidentally, the swap code in 99p4 is pretty stable. 2 swap partitions 
  33. plus 3 swap files, one on a minix fs, two on an ext fs, all attached, 
  34. flooded and finally removed with no ill effects - other than my heart!)
  35.  
  36.                                 Mike  
  37.  
  38.