# HG changeset patch # User stuefe # Date 1568112780 -7200 # Node ID b83deb51ea70bd19c16e88cdac7157c70606e305 # Parent bdf136b8ae0e8c1ee13771775e8fdedc90652070 commit granule size must not be smaller than native page size diff -r bdf136b8ae0e -r b83deb51ea70 src/hotspot/share/memory/metaspace/settings.cpp --- 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;