[gclist] Need a recommendation

Charles Fiterman cef@geodesic.com
Thu, 03 May 2001 07:58:22 -0500

At 04:26 PM 5/3/01 +0400, you wrote:
>I'm taking part in developing an ORB which includes valuetypes
>functionality. According to CORBA standard, ORB should support some GC
>for the valuetypes. The support for collecting garbage is to be
>implemented through smart pointers, and it is possible to store some
>information inside the objects being pointed to.  At that, there are
>some limitation imposed on such GC:
>1. The only information about structure of references available at run
>time is list of members of each object. That is, it is impossible to
>obtain for a given reference (smart pointer) any information about the
>object which includes it. It is impossible to tell even whether the
>reference belongs to the root set or to some object.
>2. It is better if the algorithm is concurrent/incremental.
>There are no significant memory limitations, i. e., each object as well
>as smart pointer may contain any additional data of a fixed size.

If you use something like the Boehm collector or the Geodesic Systems
collector (see my signature) that limitation is bogus. You can always find
the start of an object from a pointer to anyplace in the object and you can
find it in a small number of cycles. 

The secret is objects are either large, allocated on multiple pages, or
small allocated from a group of one or more pages. And there is a page
information table. So if you have a pointer to anywhere in a large object
the page information table tells you the whole story directly. If you have
a pointer to anywhere in a small object the table says something like this
is a pointer to a group of 5 pages split into 3278 byte objects. From there
simple arithmetic tells you which object.

Getting a collector to work with CORBA is non trivial for other reasons.
Pointers may get shipped to other systems and then return or they may be

Charles Fiterman		     Geodesic Systems
414 North Orleans Suite 410	     Phone 312 832 2015
Chicago IL 60610-4418              FAX   312 832 1230

We're starting a new electric power company and you're the
VP of operations. Your office is inside a wheel attached to
the generator.