--- a/src/hotspot/share/gc/z/zPageAllocator.cpp Fri Jun 07 11:19:34 2019 +0200
+++ b/src/hotspot/share/gc/z/zPageAllocator.cpp Fri Jun 07 11:19:34 2019 +0200
@@ -34,6 +34,7 @@
#include "gc/z/zSafeDelete.inline.hpp"
#include "gc/z/zStat.hpp"
#include "gc/z/zTracer.inline.hpp"
+#include "runtime/globals.hpp"
#include "runtime/init.hpp"
#include "runtime/java.hpp"
#include "utilities/debug.hpp"
@@ -181,8 +182,9 @@
return _max_capacity;
}
-size_t ZPageAllocator::current_max_capacity() const {
- return _current_max_capacity;
+size_t ZPageAllocator::soft_max_capacity() const {
+ // Note that SoftMaxHeapSize is a manageable flag
+ return MIN2(SoftMaxHeapSize, _current_max_capacity);
}
size_t ZPageAllocator::capacity() const {