home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / fj / maillis / xwindow / 17584 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  2.2 KB

  1. Path: sparky!uunet!stanford.edu!sun-barr!sh.wide!wnoc-tyo-news!scslwide!wsgw!wsservra!daemon
  2. From: jimf@centerline.com (Jim Frost)
  3. Newsgroups: fj.mail-lists.x-window
  4. Subject: Re: FLAME, FLAME ON X!!!
  5. Message-ID: <1992Nov18.105212.9864@sm.sony.co.jp>
  6. Date: 18 Nov 92 10:52:12 GMT
  7. Sender: daemon@sm.sony.co.jp (The devil himself)
  8. Distribution: fj
  9. Organization: CenterLine Software, Inc.
  10. Lines: 39
  11. Approved: michael@sm.sony.co.jp
  12.  
  13. Date: 17 Nov 92 21:45:16 GMT
  14. Message-Id: <1ebp5cINNp7c@armory.centerline.com>
  15. Newsgroups: comp.windows.x
  16. References: <1992Nov11.152545.1929@westford.ccur.com>
  17. Sender: xpert-request@expo.lcs.mit.edu
  18.  
  19. black@westford.ccur.com (Samuel Black) writes:
  20. >>Actually, I once saw a malloc package that could be made to return some
  21. >>memory to the operating system by clever use of sbrk and brk, but I doubt 
  22. >>that any X11 servers are written using such a technique.  Might be an
  23. >>interesting experiment for some vendor, though ...
  24.  
  25. I've written such a thing, actually.  It's not particularly difficult
  26. although it becomes a question of whether it's smarter to do the
  27. correct brk/sbrk or to hang onto the piece (the brk/sbrk requires a
  28. system call which you'd prefer to avoid).  I dealt with that issue by
  29. never doing a negative sbrk unless I had the whole piece that I got
  30. when I did the positive sbrk, but a threshold is probably a better
  31. approach.
  32.  
  33. >Now, if we just had an OS that provided support for sparse memory spaces, ...
  34.  
  35. AIX does so by default.  In my opinion it's one of its most annoying
  36. features since it means that an allocation can fail well after it's
  37. made, making it similar to programming floating-point code on a chip
  38. with a long pipeline -- you know you'll get the error condition but
  39. you have no idea when.  For applications which want sparse memory
  40. spaces this behavior is wonderful, though.  (It's actually not
  41. difficult to get traditional malloc behavior under AIX by touching
  42. every page you get back from malloc, but it's one more detail to think
  43. about.)
  44.  
  45. AIX also provides a new system call, disclaim(), which can be used to
  46. free VM pages that you don't care about anymore.  That's much better
  47. granularity than brk/sbrk and would be a *really* nice thing to make
  48. use of in a malloc package.
  49.  
  50. jim frost
  51. jimf@centerline.com
  52.