src/hotspot/share/memory/metaspace/settings.cpp
branchstuefe-new-metaspace-branch
changeset 58067 b83deb51ea70
parent 58063 bdf136b8ae0e
child 58069 ba98d1dccf30
equal deleted inserted replaced
58063:bdf136b8ae0e 58067:b83deb51ea70
    59   switch (strat) {
    59   switch (strat) {
    60   case strategy_no_reclaim:
    60   case strategy_no_reclaim:
    61 
    61 
    62     log_info(metaspace)("Initialized with strategy: no reclaim.");
    62     log_info(metaspace)("Initialized with strategy: no reclaim.");
    63 
    63 
    64     _commit_granule_bytes = 64 * K;
    64     _commit_granule_bytes = MAX2((size_t)os::vm_page_size(), 64 * K);
    65     _commit_granule_words = _commit_granule_bytes / BytesPerWord;
    65     _commit_granule_words = _commit_granule_bytes / BytesPerWord;
    66 
    66 
    67     _newborn_root_chunks_are_fully_committed = true;
    67     _newborn_root_chunks_are_fully_committed = true;
    68 
    68 
    69     _committed_words_on_fresh_chunks = chklvl::MAX_CHUNK_WORD_SIZE;
    69     _committed_words_on_fresh_chunks = chklvl::MAX_CHUNK_WORD_SIZE;
    81 
    81 
    82     log_info(metaspace)("Initialized with strategy: aggressive reclaim.");
    82     log_info(metaspace)("Initialized with strategy: aggressive reclaim.");
    83 
    83 
    84     // Set the granule size rather small; may increase
    84     // Set the granule size rather small; may increase
    85     // mapping fragmentation but also increase chance to uncommit.
    85     // mapping fragmentation but also increase chance to uncommit.
    86     _commit_granule_bytes = 16 * K;
    86     _commit_granule_bytes = MAX2((size_t)os::vm_page_size(), 16 * K);
    87     _commit_granule_words = _commit_granule_bytes / BytesPerWord;
    87     _commit_granule_words = _commit_granule_bytes / BytesPerWord;
    88 
    88 
    89     _newborn_root_chunks_are_fully_committed = false;
    89     _newborn_root_chunks_are_fully_committed = false;
    90 
    90 
    91     // When handing out fresh chunks, only commit the minimum sensible amount (0 would be possible
    91     // When handing out fresh chunks, only commit the minimum sensible amount (0 would be possible
   104 
   104 
   105   case strategy_balanced_reclaim:
   105   case strategy_balanced_reclaim:
   106 
   106 
   107     log_info(metaspace)("Initialized with strategy: balanced reclaim.");
   107     log_info(metaspace)("Initialized with strategy: balanced reclaim.");
   108 
   108 
   109     _commit_granule_bytes = 64 * K;
   109     _commit_granule_bytes = MAX2((size_t)os::vm_page_size(), 64 * K);
   110     _commit_granule_words = _commit_granule_bytes / BytesPerWord;
   110     _commit_granule_words = _commit_granule_bytes / BytesPerWord;
   111 
   111 
   112     _newborn_root_chunks_are_fully_committed = false;
   112     _newborn_root_chunks_are_fully_committed = false;
   113 
   113 
   114     // When handing out fresh chunks, only commit the minimum sensible amount (0 would be possible
   114     // When handing out fresh chunks, only commit the minimum sensible amount (0 would be possible