Testing no memory leak occurs via references
Albert Yang
albert.m.yang at oracle.com
Mon Mar 6 13:51:09 UTC 2023
Upon a cursory inspection of ForceGC.java, it seems that the fundamental logic involves waiting for a certain duration and relying on chance. However, I am of the opinion that utilizing the WhiteBox API can provide greater determinism and potentially strengthen some of the assertions.
> I decided ForceGC is simpler and easier to use
I was not aware of your specific requirements, so I cannot say for certain which approach is best. (However, it is worth noting that the WhiteBox API can be utilized to implement ForceGC if necessary.)
/Albert
More information about the hotspot-gc-dev
mailing list