8154179: BasicImageReader activating ImageBufferCache when not used
Reviewed-by: redestad
--- 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() {