<Swing Dev> Review request for JDK-8030099 Memory usage of java process increases after pressing start button in test window
Rajeev Chamyal
rajeev.chamyal at oracle.com
Mon Oct 19 12:10:26 UTC 2015
Hello,
Please review the following fix for Jdk9:
Bug: https://bugs.openjdk.java.net/browse/JDK-8030099
Webrev: http://cr.openjdk.java.net/~rchamyal/8030099/webrev.00/
Issue: The memory usage of java process goes on increasing if we call ShellFolder:listFiles API
aggressively on some folder with large number of files/folders.
Cause: Win32ShellFolder class registers its instances and native data with sun.java2d.Disposer class for later disposal.
Win32ShellFolder instances are getting registered as PhantomReferences with Disposer and are not getting cleared immediately.
This leads to increase of memory usage by java process.
Fix: Instead of registering the complete Win32ShellFolder object reference with disposer we are now adding only a sentinel object and also using sun.java2d.Disposer :: addObjectRecord API which adds the references as WeakReferences.
Regards,
Rajeev Chamyal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20151019/f41b0eb4/attachment.html>
More information about the swing-dev
mailing list