-
Bug
-
Resolution: Unresolved
-
P3
-
None
-
24
Test: java/nio/Buffer/LimitDirectMemory.java
Exception in thread "main" java.lang.OutOfMemoryError: Cannot reserve 8192 bytes of direct buffer memory (allocated: 0, limit: 10)
at java.base/java.nio.Bits.reserveMemory(Bits.java:178)
at java.base/java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:105)
at java.base/java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:363)
at java.base/sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:242)
at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:304)
at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:284)
at java.base/sun.nio.ch.FileChannelImpl.implRead(FileChannelImpl.java:251)
at java.base/sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:231)
at java.base/sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:74)
at java.base/sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:103)
at java.base/java.io.InputStream.read(InputStream.java:220)
at java.base/java.util.Properties$LineReader.readLine(Properties.java:505)
at java.base/java.util.Properties.load0(Properties.java:421)
at java.base/java.util.Properties.load(Properties.java:410)
This test deliberately sets -XX:MaxDirectMemorySize=10 and this failure shows that the core libs code is now requiring at least 8K of direct memory buffers where previously it did not.
Exception in thread "main" java.lang.OutOfMemoryError: Cannot reserve 8192 bytes of direct buffer memory (allocated: 0, limit: 10)
at java.base/java.nio.Bits.reserveMemory(Bits.java:178)
at java.base/java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:105)
at java.base/java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:363)
at java.base/sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:242)
at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:304)
at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:284)
at java.base/sun.nio.ch.FileChannelImpl.implRead(FileChannelImpl.java:251)
at java.base/sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:231)
at java.base/sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:74)
at java.base/sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:103)
at java.base/java.io.InputStream.read(InputStream.java:220)
at java.base/java.util.Properties$LineReader.readLine(Properties.java:505)
at java.base/java.util.Properties.load0(Properties.java:421)
at java.base/java.util.Properties.load(Properties.java:410)
This test deliberately sets -XX:MaxDirectMemorySize=10 and this failure shows that the core libs code is now requiring at least 8K of direct memory buffers where previously it did not.
- relates to
-
JDK-8344882 (bf) Temporary direct buffers should not count against the upper limit on direct buffer memory
- In Progress
-
JDK-8340728 Test vmTestbase/gc/memory/Nio/Nio.java is failing to allocate all direct buffer memory
- In Progress
There are no Sub-Tasks for this issue.