8154179: BasicImageReader activating ImageBufferCache when not used
authorjlaskey
Mon, 25 Apr 2016 09:57:56 -0300
changeset 37617 d91c47cb2992
parent 37616 d7794846510d
child 37618 28e00d8a1395
8154179: BasicImageReader activating ImageBufferCache when not used Reviewed-by: redestad
jdk/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java
--- a/jdk/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java	Mon Apr 25 09:57:55 2016 -0300
+++ b/jdk/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java	Mon Apr 25 09:57:56 2016 -0300
@@ -183,7 +183,9 @@
     }
 
     public static void releaseByteBuffer(ByteBuffer buffer) {
-        ImageBufferCache.releaseBuffer(buffer);
+        if (!MAP_ALL) {
+            ImageBufferCache.releaseBuffer(buffer);
+        }
     }
 
     public String getName() {