This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: Linker + Verifier fixes


Andrew Haley wrote:
> OK, it probably makes sense to use some hash structure to store the > closure data - in the event that we have a whole bunch of classes all > referencing the same missing class/method, then we can share just one > closure for each missing method. However, it seems to me that a > WeakHashMap won't do any good without custom marking code for class > anyway - else there is no way for the GC to determine when an entry in > the map becomes unreachable.

An entry in the WeakHashMap becomes unreachable when the class that
will use it becomes unreachable, surely. So, the key is the class.
Yes, but recall that we have a custom marking function for classes - so to implement this would require adding code to mark the keys in the WeakHashMap, otherwise the GC will always see them as unreachable. If we need to add custom mark code anyway, then the need for a WeakHashMap disappears.
But it really doesn't matter ATM -- all we must have is some heap
allocated memory that won't mysteriously disappear.
Agreed.

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]