[kaffe] Re: Destroyed strings...

Patrick Tullmann tullmann@cs.utah.edu
Wed, 5 Jun 2002 16:19:00 -0600


Godmar wrote:
> You're right.  We can't have strings pending to be destroyed in the
> intern table when there's a chance others might try to intern
> identical strings.  So we must synchronize against the intern lock
> somehow, ideally without deadlocking.

Perhaps the intern'd string table should be walked, but only the
char[] objects referenced from it should be marked (not the Strings).
(I think the intern table is currently ignored by the GC.)

This would prevent the race conditions because the char[] could never
disappear before the contianing String object did.

I'm not sure if there's an implicit deadlock in having the GC acquire
the string table lock...

-Pat

----- ----- ---- ---  ---  --   -    -      -         -               -
Pat Tullmann                                       tullmann@cs.utah.edu
 Never ascribe to malice that which can be explained by incompetence.