home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / cplus / 12341 < prev    next >
Encoding:
Text File  |  1992-08-14  |  1.6 KB  |  32 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!zrz.tu-berlin.de!Sirius.dfn.de!news.uni-stuttgart.de!rz.uni-karlsruhe.de!stepsun.uni-kl.de!uklirb!uklirb!hf
  3. From: hf@informatik.uni-kl.de (Harald Fuchs)
  4. Subject: Re: Garbage Collection for C++
  5. In-Reply-To: daveg@synaptics.com's message of 13 Aug 92 09:56:29 GMT
  6. Message-ID: <HF.92Aug14123253@demisec.informatik.uni-kl.de>
  7. Sender: news@uklirb.informatik.uni-kl.de (Unix-News-System)
  8. Nntp-Posting-Host: demisec.informatik.uni-kl.de
  9. Organization: Kaiserslautern University, Germany
  10. References: <1992Aug6.014619.2111@ucc.su.OZ.AU> <DAVEG.92Aug13025629@synaptx.synaptics.com>
  11. Date: Fri, 14 Aug 1992 11:32:52 GMT
  12. Lines: 18
  13.  
  14. > For reference, here's KCL's solution (roughly):  Memory
  15. > is divided into pages.  All objects stored on a given page will
  16. > have the same size.  There is a "page table" which contains, for
  17. > each page of memory, the size of the objects stored in that page
  18. > (or zero for pages which do not contain GC-able things).  Given
  19. > any 32-bit quantity which "might" be a pointer, first take the
  20. > high bits to find the page, check if this is a valid GC-able page,
  21. > and if so, round the page offset down to a multiple of the page's
  22. > object size to get a pointer to an object on the page.
  23.  
  24. This works fine for Lisp systems where you have only a limited number
  25. of basic object types and thus a limited number of possible sizes. I
  26. don't think that it would work for C++ where the application
  27. programmer can create lots of objects with different sizes.
  28. But you can use this scheme if you want to GC only some of your objects.
  29. --
  30.  
  31. Harald Fuchs <hf@informatik.uni-kl.de>
  32.