--- a/hotspot/src/share/vm/prims/jvm.cpp Thu Apr 28 21:56:38 2016 +0000
+++ b/hotspot/src/share/vm/prims/jvm.cpp Thu Apr 28 23:32:50 2016 +0000
@@ -389,7 +389,7 @@
PUTPROP(props, "sun.nio.MaxDirectMemorySize", "-1");
} else {
char as_chars[256];
- jio_snprintf(as_chars, sizeof(as_chars), SIZE_FORMAT, MaxDirectMemorySize);
+ jio_snprintf(as_chars, sizeof(as_chars), JULONG_FORMAT, MaxDirectMemorySize);
PUTPROP(props, "sun.nio.MaxDirectMemorySize", as_chars);
}
}
--- a/hotspot/src/share/vm/runtime/globals.hpp Thu Apr 28 21:56:38 2016 +0000
+++ b/hotspot/src/share/vm/runtime/globals.hpp Thu Apr 28 23:32:50 2016 +0000
@@ -3847,9 +3847,9 @@
\
/* Properties for Java libraries */ \
\
- product(size_t, MaxDirectMemorySize, 0, \
+ product(uint64_t, MaxDirectMemorySize, 0, \
"Maximum total size of NIO direct-buffer allocations") \
- range(0, (size_t)SIZE_MAX) \
+ range(0, max_jlong) \
\
/* Flags used for temporary code during development */ \
\