[kaffe] Weak references/Class destruction

Guilhem Lavaux guilhem at kaffe.org
Wed Dec 22 09:05:31 PST 2004


Hi,

Here is a patch which changes the way the classes are destroyed and 
implements
weak references for boehm-gc and kaffe-gc. This fixes class concurrent
destruction issues which was bugging boehm-gc (and maybe also kaffe-gc) and
should insure that we do not access already freed memory.

There are some drawbacks:
* creating a weak reference is slow and consumes memory.
* walking a class takes more time as you have to decide whether to mark 
or not some memory.

Advantages:
* boehm-gc should work now (even if some bugs might still lurk around 
the structure is in place).
* Relieve the VM from caring about some pointers shared between several 
classes (like interface implementors).
* The patch does not touch the class structure.

It seems that I've still a failure from time to time in ClassGC when 
using the boehm-gc. We will have check this.

Here is the patch. If nobody rejects it I'll check it in tomorrow.

Regards,

Guilhem Lavaux.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: class_patch
Url: http://kaffe.org/pipermail/kaffe/attachments/20041222/2950c559/attachment-0002.txt 


More information about the kaffe mailing list