From 95c4a3c7b6b256de4293ed1b31380d6af5ab59d0 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 26 Sep 2014 12:13:43 +0200 Subject: Bug 1080 - Fix TestByteBufferInputStream: Handle OutOfMemoryError cause in IOException (Add note to FLUSH_NONE); Reduce test load / duration. --- src/java/com/jogamp/common/nio/MappedByteBufferInputStream.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/java/com/jogamp/common') diff --git a/src/java/com/jogamp/common/nio/MappedByteBufferInputStream.java b/src/java/com/jogamp/common/nio/MappedByteBufferInputStream.java index 52f5b5a..5ac1ffb 100644 --- a/src/java/com/jogamp/common/nio/MappedByteBufferInputStream.java +++ b/src/java/com/jogamp/common/nio/MappedByteBufferInputStream.java @@ -56,6 +56,13 @@ public class MappedByteBufferInputStream extends InputStream { * Keep all previous lazily cached buffer slices alive, useful for hopping readers, * i.e. random access via {@link MappedByteBufferInputStream#position(long) position(p)} * or {@link MappedByteBufferInputStream#reset() reset()}. + *

+ * Note that without flushing, the platform may fail memory mapping + * due to virtual address space exhaustion.
+ * In such case an {@link OutOfMemoryError} may be thrown directly, + * or encapsulated as the {@link IOException#getCause() the cause} + * of a thrown {@link IOException}. + *

*/ FLUSH_NONE, /** -- cgit v1.2.3