8231825: ZGC: Remove ZMaxHeapSize and ZMaxHeapSizeShift

Reviewed-by: tschatzl, eosterlund
This commit is contained in:
Per Lidén 2019-10-07 07:53:38 +02:00
parent 515db21790
commit 0009f8a51f
5 changed files with 7 additions and 11 deletions

@ -36,7 +36,6 @@
// ------------------------------------------------------------------
//
const size_t ZPlatformGranuleSizeShift = 21; // 2MB
const size_t ZPlatformMaxHeapSizeShift = 44; // 16TB
const size_t ZPlatformNMethodDisarmedOffset = 4;
const size_t ZPlatformCacheLineSize = 64;

@ -36,7 +36,6 @@
// ------------------------------------------------------------------
//
const size_t ZPlatformGranuleSizeShift = 21; // 2MB
const size_t ZPlatformMaxHeapSizeShift = 44; // 16TB
const size_t ZPlatformNMethodDisarmedOffset = 4;
const size_t ZPlatformCacheLineSize = 64;

@ -37,11 +37,6 @@ void ZArguments::initialize_alignments() {
void ZArguments::initialize() {
GCArguments::initialize();
// Check max heap size
if (MaxHeapSize > ZMaxHeapSize) {
vm_exit_during_initialization("Java heap too large");
}
// Enable NUMA by default
if (FLAG_IS_DEFAULT(UseNUMA)) {
FLAG_SET_DEFAULT(UseNUMA, true);

@ -44,10 +44,6 @@ extern uint32_t ZGlobalSeqNum;
const size_t ZGranuleSizeShift = ZPlatformGranuleSizeShift;
const size_t ZGranuleSize = (size_t)1 << ZGranuleSizeShift;
// Max heap size shift/size
const size_t ZMaxHeapSizeShift = ZPlatformMaxHeapSizeShift;
const size_t ZMaxHeapSize = (size_t)1 << ZMaxHeapSizeShift;
// Page types
const uint8_t ZPageTypeSmall = 0;
const uint8_t ZPageTypeMedium = 1;

@ -31,6 +31,13 @@ ZVirtualMemoryManager::ZVirtualMemoryManager(size_t max_capacity) :
_manager(),
_initialized(false) {
// Check max supported heap size
if (max_capacity > ZAddressOffsetMax) {
log_error(gc)("Java heap too large (max supported heap size is " SIZE_FORMAT "G)",
ZAddressOffsetMax / G);
return;
}
log_info(gc, init)("Address Space: " SIZE_FORMAT "T", ZAddressOffsetMax / K / G);
// Reserve address space