mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 03:54:33 +02:00
8073632: Make auxiliary data structures know their own translation factor
Auxiliary data structures should have knowledge of their own requirements for virtual memory reservations instead of getting these values directly from various places. Reviewed-by: stefank, kbarrett
This commit is contained in:
parent
689d9a58b1
commit
e08169c253
6 changed files with 42 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -39,6 +39,17 @@ void G1CardCountsMappingChangedListener::on_commit(uint start_idx, size_t num_re
|
|||
_counts->clear_range(mr);
|
||||
}
|
||||
|
||||
size_t G1CardCounts::compute_size(size_t mem_region_size_in_words) {
|
||||
// We keep card counts for every card, so the size of the card counts table must
|
||||
// be the same as the card table.
|
||||
return G1SATBCardTableLoggingModRefBS::compute_size(mem_region_size_in_words);
|
||||
}
|
||||
|
||||
size_t G1CardCounts::heap_map_factor() {
|
||||
// See G1CardCounts::compute_size() why we reuse the card table value.
|
||||
return G1SATBCardTableLoggingModRefBS::heap_map_factor();
|
||||
}
|
||||
|
||||
void G1CardCounts::clear_range(size_t from_card_num, size_t to_card_num) {
|
||||
if (has_count_table()) {
|
||||
assert(from_card_num < to_card_num,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue