DirectByteBuffer change proposal

Biju G.S Nair gs.biju at
Tue Aug 11 14:11:43 UTC 2015

Hello All,
   While the patch
currently applied to jdk 9 (which I had requested to be back ported to JDK
8 & 7) fixes the OOM exception during memory allocation by exponentially
increasing the sleep time, this can negatively impact low latency
applications using DirectByteBuffers. If we are able to provide a new JVM
parameter which the users can set to a percentage value of DirectBuffer use
as threshold when the "System.gc()" call in java/nio/ to be made,
then the probability of sleep time being much lower is high. Also it gives
users some control over when the gc() need to be requested instead of
starting the gc() at the last moment when the direct memory is used fully.
Without knowing all the details, to me it looks like a straight forward
change. Let me know if there is any issue with the proposed change. If this
change is a possibility let me know how I can make a request for this


More information about the jdk8u-dev mailing list