Proposal for finalizer optimization.

Tony Printezis tony.printezis at sun.com
Sun Nov 25 18:05:11 UTC 2007


Do you mean that you're planning to run the finalizer as part of the GC, 
just before it reclaims an object's memory?

Tony

Ramón García wrote:
> I am thinking about optimizing the implementation of finalizing.
>
> At present, finalizing imposes a high overhead to garbage collection.
> If an object has a finalizer, it must be collected twice, in case the
> finalizer creates a reference to the object somewhere. In the vast
> majority of cases this does not happen. The optimization would detect
> that the finalizer cannot create such references , and would mark the
> finalizer to run exactly before the memory of the object is released.
>
> What would be the best place to insert this optimization? Any other ideas?
>   



More information about the hotspot-gc-dev mailing list