[kaffe] Re: Destroyed strings...

Patrick Tullmann tullmann at cs.utah.edu
Wed Jun 5 15:19:00 PDT 2002


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 at cs.utah.edu
 Never ascribe to malice that which can be explained by incompetence.




More information about the kaffe mailing list