changeset 14307:baeb5edb3893 jdk-9+116

8154179: BasicImageReader activating ImageBufferCache when not used Reviewed-by: redestad
author jlaskey
date Mon, 25 Apr 2016 09:57:56 -0300
parents 72ef20479778
children aed6c78e29a3 56379812ec5e 41f95dde9770 fe8df8e55825
files src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java	Mon Apr 25 09:57:55 2016 -0300
+++ b/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() {