home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- 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
- From: hf@informatik.uni-kl.de (Harald Fuchs)
- Subject: Re: Garbage Collection for C++
- In-Reply-To: daveg@synaptics.com's message of 13 Aug 92 09:56:29 GMT
- Message-ID: <HF.92Aug14123253@demisec.informatik.uni-kl.de>
- Sender: news@uklirb.informatik.uni-kl.de (Unix-News-System)
- Nntp-Posting-Host: demisec.informatik.uni-kl.de
- Organization: Kaiserslautern University, Germany
- References: <1992Aug6.014619.2111@ucc.su.OZ.AU> <DAVEG.92Aug13025629@synaptx.synaptics.com>
- Date: Fri, 14 Aug 1992 11:32:52 GMT
- Lines: 18
-
- > For reference, here's KCL's solution (roughly): Memory
- > is divided into pages. All objects stored on a given page will
- > have the same size. There is a "page table" which contains, for
- > each page of memory, the size of the objects stored in that page
- > (or zero for pages which do not contain GC-able things). Given
- > any 32-bit quantity which "might" be a pointer, first take the
- > high bits to find the page, check if this is a valid GC-able page,
- > and if so, round the page offset down to a multiple of the page's
- > object size to get a pointer to an object on the page.
-
- This works fine for Lisp systems where you have only a limited number
- of basic object types and thus a limited number of possible sizes. I
- don't think that it would work for C++ where the application
- programmer can create lots of objects with different sizes.
- But you can use this scheme if you want to GC only some of your objects.
- --
-
- Harald Fuchs <hf@informatik.uni-kl.de>
-