[gclist] weak pointers

Fabio Riccardi Fabio.Riccardi@inria.fr
Wed, 12 Feb 1997 11:23:46 +0100


Hi!

I have a question for the gc list...

Preamble:

in my research group we are implementing a distributed persistent
object store (PerDiS: http://www-sor.inria.fr/perdis/).

Our store implements a notion of "persistence by reachability": an
object is considered to be persistent in the store if it is reachable
through a chain of pointers starting from some known root.

As all you might guess, this is the job of a garbage collector...

Now comes the question:

in our system we export towards the user an API with a basic C++
semantics: the user can allocate objects (with the new operstor) and
navigate the store dereferencing pointers. The system will take care
of removing useless garbage.

It would be nice though to give the user some kind of higher level
facilities in the form of a library, like the STL, to manipulate
indexed collections of objects, iterate on them, etc... like many
OODBs do.

My problem is that such kind of library interferes with the work of
the garbage collector, because the creation of indexes implies more
references within the system, and such.

In the group we have come to the conclusion that we must use some kind
of "weak pointers" to implement such facilities, or at least make our
containers and indexes gc-aware.

Can any of you suggest some readings about this subject, or point to
some related work, give advice, smart tricks?

Thank you very much in advance, ciao,

	Fabio

-- 
Fabio Riccardi - INRIA, Project SOR  |
email : Fabio.Riccardi@inria.fr      | * time is on our side! *
phone : +33 (1) 39 63 57 55          |