home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / windows / x / 19259 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  2.1 KB

  1. Path: sparky!uunet!utcsri!newsflash.concordia.ca!garrot.DMI.USherb.CA!uxa.ecn.bgu.edu!mp.cs.niu.edu!ux1.cso.uiuc.edu!uwm.edu!zaphod.mps.ohio-state.edu!caen!nic.umass.edu!noc.near.net!news.centerline.com!jimf
  2. From: jimf@centerline.com (Jim Frost)
  3. Newsgroups: comp.windows.x
  4. Subject: Re: FLAME, FLAME ON X!!!
  5. Date: 17 Nov 1992 21:45:16 GMT
  6. Organization: CenterLine Software, Inc.
  7. Lines: 33
  8. Message-ID: <1ebp5cINNp7c@armory.centerline.com>
  9. References: <1992Nov11.152545.1929@westford.ccur.com>
  10. NNTP-Posting-Host: 140.239.3.202
  11.  
  12. black@westford.ccur.com (Samuel Black) writes:
  13. >>Actually, I once saw a malloc package that could be made to return some
  14. >>memory to the operating system by clever use of sbrk and brk, but I doubt 
  15. >>that any X11 servers are written using such a technique.  Might be an
  16. >>interesting experiment for some vendor, though ...
  17.  
  18. I've written such a thing, actually.  It's not particularly difficult
  19. although it becomes a question of whether it's smarter to do the
  20. correct brk/sbrk or to hang onto the piece (the brk/sbrk requires a
  21. system call which you'd prefer to avoid).  I dealt with that issue by
  22. never doing a negative sbrk unless I had the whole piece that I got
  23. when I did the positive sbrk, but a threshold is probably a better
  24. approach.
  25.  
  26. >Now, if we just had an OS that provided support for sparse memory spaces, ...
  27.  
  28. AIX does so by default.  In my opinion it's one of its most annoying
  29. features since it means that an allocation can fail well after it's
  30. made, making it similar to programming floating-point code on a chip
  31. with a long pipeline -- you know you'll get the error condition but
  32. you have no idea when.  For applications which want sparse memory
  33. spaces this behavior is wonderful, though.  (It's actually not
  34. difficult to get traditional malloc behavior under AIX by touching
  35. every page you get back from malloc, but it's one more detail to think
  36. about.)
  37.  
  38. AIX also provides a new system call, disclaim(), which can be used to
  39. free VM pages that you don't care about anymore.  That's much better
  40. granularity than brk/sbrk and would be a *really* nice thing to make
  41. use of in a malloc package.
  42.  
  43. jim frost
  44. jimf@centerline.com
  45.