RFR (S) CR 6857566: (bf) DirectByteBuffer garbage creation can outpace reclamation
Paul Sandoz
paul.sandoz at oracle.com
Thu Oct 3 12:32:45 UTC 2013
On Oct 3, 2013, at 7:13 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 02/10/2013 09:49, Aleksey Shipilev wrote:
>> On 10/02/2013 08:31 PM, Alan Bateman wrote:
>>> On 02/10/2013 07:43, Aleksey Shipilev wrote:
>>>> http://cr.openjdk.java.net/~shade/6857566/webrev.00/
>>>>
>>> I'd like to review, I just don't have time at the moment.
>> Thanks Alan, we can wait.
> BTW: Is this important enough to attempt to do this late in 8? I just wonder about a significant change like switching to weak references and whether it would be more sensible to hold it back to do early in 9.
>
It appears that cleaner is used (within the JDK) exclusively for nio native/direct buffers although an intention was for a more light weight mechanism to that of finalization.
grepcode.com reports only one external use:
http://grepcode.com/search/usages?id=repository.grepcode.com$java$root@jdk$openjdk@7-b147@sun$misc@Cleaner&start=0&type=type&k=u
Given the minimal usage perhaps the risk of moving from phantom to weak refs is reduced. Maybe Cleaner could be repurposed and moved to the nio area?
Alexsey, what do you observe if you revert back Cleaner to a PhantomReference and retain QUEUE/CLEANERS but not assistCleanupSlow?
Paul
More information about the core-libs-dev
mailing list