8048192: (bf) Out of direct buffer memory message should include the limits
Brian Burkhalter
brian.burkhalter at oracle.com
Thu Feb 14 16:25:35 UTC 2019
https://bugs.openjdk.java.net/browse/JDK-8048192 <https://bugs.openjdk.java.net/browse/JDK-8048192>
One possible solution is given below but I am not sure whether composing such an error string is desirable during bootstrap / startup. If this is undesirable then perhaps the issue should be resolved as WNF?
Thanks,
Brian
--- a/src/java.base/share/classes/java/nio/Bits.java
+++ b/src/java.base/share/classes/java/nio/Bits.java
@@ -172,7 +172,11 @@
}
// no luck
- throw new OutOfMemoryError("Direct buffer memory");
+ throw new OutOfMemoryError
+ ("Direct buffer memory: MAX_MEMORY = " + MAX_MEMORY
+ + ", RESERVED_MEMORY = " + RESERVED_MEMORY.get()
+ + ", TOTAL_CAPACITY = " + TOTAL_CAPACITY.get()
+ + ", size = " + size + ", cap = " + cap);
} finally {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190214/ed756ca5/attachment.html>
More information about the nio-dev
mailing list