RFR - 6857566 (bf) DirectByteBuffer garbage creation can outpace reclamation
peter.levart at gmail.com
Thu Feb 20 16:59:10 UTC 2014
On 02/05/2014 11:21 AM, Alan Bateman wrote:
> On 05/02/2014 08:08, Peter Levart wrote:
>> I'm proposing a patch for the following issue:
>> The patch is basically the same as developed and tested as part of
>> the following discussion 3 months ago:
>> It's just modified to be applied on top of JDK9 which already changed
>> since then. Here's the webrev:
I made another webrev with minor changes based on your feedback...
> Thanks for re-basing the changes and from the previous discussion then
> I think there was agreement on the approach. So I'd say this is ready
> to go into jdk9/dev.
> A minor comments on the usages of tryHandlePendingReferences in Bits
> that it might be a bit neater to not split the line. At least when
> looking at the patch then it makes it a bit more obvious what is
> condition vs. statement in the while loop.
I did that by extracting the reference to JavaLangRefAccess into a local
> Another minor comment is that usually avoid System.exit in tests. It's
> probably okay here as it always runs in othervm mode but in other
> modes a System.exit(0) will be flagged by jtreg and will require it
> spin up another VM.
No System.exit in this webrev any more. The test should still run in
othervm though, since it uses special VM option
"-XX:MaxDirectMemorySize=128m". Without it there might be to much direct
memory available by default on some machine (like mine with 16GB of RAM)
to provoke an error in 5 seconds time...
> I completely agree with separating the mapped buffers issue to a
> separate issue.
> Thanks again for running with this one (it goes back to original
> implementation in JDK 1.4).
I think I'll need another official review before pushing this.
More information about the core-libs-dev