Hello All, While the patch https://bugs.openjdk.java.net/browse/JDK-6857566 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/Bits.java 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 change.
Thanks, Biju