equal
deleted
inserted
replaced
82 // If _uncommit_on_purge is true: |
82 // If _uncommit_on_purge is true: |
83 // Minimum word size of an area to be candidate for uncommitting. |
83 // Minimum word size of an area to be candidate for uncommitting. |
84 // Must be a multiple of and not smaller than commit granularity. |
84 // Must be a multiple of and not smaller than commit granularity. |
85 static size_t _uncommit_on_purge_min_word_size; |
85 static size_t _uncommit_on_purge_min_word_size; |
86 |
86 |
|
87 // If true, allocations from micro-clds (CLDs which only load one class, e.g. hidden classes or |
|
88 // reflection loaders) are shepherded into an own root chunk. |
|
89 static bool _separate_micro_cld_allocations; |
|
90 |
87 public: |
91 public: |
88 |
92 |
89 static size_t commit_granule_bytes() { return _commit_granule_bytes; } |
93 static size_t commit_granule_bytes() { return _commit_granule_bytes; } |
90 static size_t commit_granule_words() { return _commit_granule_words; } |
94 static size_t commit_granule_words() { return _commit_granule_words; } |
91 static bool newborn_root_chunks_are_fully_committed() { return _newborn_root_chunks_are_fully_committed; } |
95 static bool newborn_root_chunks_are_fully_committed() { return _newborn_root_chunks_are_fully_committed; } |
97 static bool uncommit_on_return() { return _uncommit_on_return; } |
101 static bool uncommit_on_return() { return _uncommit_on_return; } |
98 static size_t uncommit_on_return_min_word_size() { return _uncommit_on_return_min_word_size; } |
102 static size_t uncommit_on_return_min_word_size() { return _uncommit_on_return_min_word_size; } |
99 static bool delete_nodes_on_purge() { return _delete_nodes_on_purge; } |
103 static bool delete_nodes_on_purge() { return _delete_nodes_on_purge; } |
100 static bool uncommit_on_purge() { return _uncommit_on_purge; } |
104 static bool uncommit_on_purge() { return _uncommit_on_purge; } |
101 static size_t uncommit_on_purge_min_word_size() { return _uncommit_on_purge_min_word_size; } |
105 static size_t uncommit_on_purge_min_word_size() { return _uncommit_on_purge_min_word_size; } |
|
106 static bool separate_micro_cld_allocations() { return _separate_micro_cld_allocations; } |
102 |
107 |
103 // Describes a group of settings |
108 static void ergo_initialize(); |
104 enum strategy_t { |
|
105 |
|
106 // Do not uncommit chunks. New chunks are completely committed thru from the start. |
|
107 strategy_no_reclaim, |
|
108 |
|
109 // Uncommit very aggressively. |
|
110 // - a rather small granule size of 16K |
|
111 // - New chunks are committed for one granule size |
|
112 // - returned chunks are uncommitted whenever possible |
|
113 strategy_aggressive_reclaim, |
|
114 |
|
115 // Uncommit, but try to strike a balance with CPU load |
|
116 strategy_balanced_reclaim |
|
117 |
|
118 }; |
|
119 |
|
120 static void initialize(strategy_t theme); |
|
121 |
109 |
122 static void print_on(outputStream* st); |
110 static void print_on(outputStream* st); |
123 |
111 |
124 }; |
112 }; |
125 |
113 |