mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
8038423: G1: Decommit memory within heap
Allow G1 to decommit memory of arbitrary regions within the heap and their associated auxiliary data structures card table, BOT, hot card cache, and mark bitmaps. Reviewed-by: mgerdin, brutisso, jwilhelm
This commit is contained in:
parent
2617d54723
commit
100e51a339
32 changed files with 1322 additions and 579 deletions
|
@ -33,7 +33,7 @@
|
|||
G1HotCardCache::G1HotCardCache(G1CollectedHeap *g1h):
|
||||
_g1h(g1h), _hot_cache(NULL), _use_cache(false), _card_counts(g1h) {}
|
||||
|
||||
void G1HotCardCache::initialize() {
|
||||
void G1HotCardCache::initialize(G1RegionToSpaceMapper* card_counts_storage) {
|
||||
if (default_use_cache()) {
|
||||
_use_cache = true;
|
||||
|
||||
|
@ -49,7 +49,7 @@ void G1HotCardCache::initialize() {
|
|||
_hot_cache_par_chunk_size = MAX2(1, _hot_cache_size / (int)n_workers);
|
||||
_hot_cache_par_claimed_idx = 0;
|
||||
|
||||
_card_counts.initialize();
|
||||
_card_counts.initialize(card_counts_storage);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -135,11 +135,8 @@ void G1HotCardCache::drain(uint worker_i,
|
|||
// above, are discarded prior to re-enabling the cache near the end of the GC.
|
||||
}
|
||||
|
||||
void G1HotCardCache::resize_card_counts(size_t heap_capacity) {
|
||||
_card_counts.resize(heap_capacity);
|
||||
}
|
||||
|
||||
void G1HotCardCache::reset_card_counts(HeapRegion* hr) {
|
||||
assert(!hr->isHumongous(), "Should have been cleared");
|
||||
_card_counts.clear_region(hr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue