--- a/src/hotspot/share/memory/metaspace/settings.cpp Tue Sep 10 09:24:05 2019 +0200
+++ b/src/hotspot/share/memory/metaspace/settings.cpp Tue Sep 10 12:53:00 2019 +0200
@@ -61,7 +61,7 @@
log_info(metaspace)("Initialized with strategy: no reclaim.");
- _commit_granule_bytes = 64 * K;
+ _commit_granule_bytes = MAX2((size_t)os::vm_page_size(), 64 * K);
_commit_granule_words = _commit_granule_bytes / BytesPerWord;
_newborn_root_chunks_are_fully_committed = true;
@@ -83,7 +83,7 @@
// Set the granule size rather small; may increase
// mapping fragmentation but also increase chance to uncommit.
- _commit_granule_bytes = 16 * K;
+ _commit_granule_bytes = MAX2((size_t)os::vm_page_size(), 16 * K);
_commit_granule_words = _commit_granule_bytes / BytesPerWord;
_newborn_root_chunks_are_fully_committed = false;
@@ -106,7 +106,7 @@
log_info(metaspace)("Initialized with strategy: balanced reclaim.");
- _commit_granule_bytes = 64 * K;
+ _commit_granule_bytes = MAX2((size_t)os::vm_page_size(), 64 * K);
_commit_granule_words = _commit_granule_bytes / BytesPerWord;
_newborn_root_chunks_are_fully_committed = false;