Re: Garbage collection, part two...

From: Erick Gallesio <eg_at_unice.fr>
Date: Sun, 16 Apr 2000 23:12:31 +0200 (CEST)

Felix Lee writes:
> A safer fix, much safer than fiddling with volatile or the
> other methods, is to change garbage collection so that a
> pointer to any part of an object, not just the head of the
> object, will cause the object to be marked. But I think
> this is hard to do, given the way objects are currently
> represented. (the only ways I can think of doing this
> require unreasonable time or space. but someone experienced
> with garbage collectors may have a better idea.)


A possible way consists to use the Boehm GC. I have made some
experiment with it and it seems to work quite well. However, by just
replacing STk_must_malloc with GC_malloc will give you a program which
is slower (a little bit) and larger (more importantly, if you use not
a lot of memory, a little bit less on contrary). Concerning the size,
I have not tried to tune it, by lack of knowledge of how to do it
with this GC

                -- Erick

PS: I have made some measures some time ago and was convinced to not
used the Boehm GC because of the "folded" nature of STk objects. In
the "next generation" (very marketing ;-) of STk, I will use the Boehm
GC, but a completely different layouts for the objects. In this case
we are faster (I have not tried to fix the size issue yet, but it
seems reasonable with current layout).
Received on Sun Apr 16 2000 - 23:19:32 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST