8303250: Call ct_max_alignment_constraint using the base class

Reviewed-by: kbarrett, tschatzl
This commit is contained in:
Albert Mingkun Yang 2023-02-28 13:39:58 +00:00
parent e144783eb2
commit 30302d185a
2 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@
#include "gc/g1/g1HeapVerifier.hpp"
#include "gc/g1/heapRegion.hpp"
#include "gc/g1/heapRegionRemSet.hpp"
#include "gc/shared/cardTableRS.hpp"
#include "gc/shared/cardTable.hpp"
#include "gc/shared/gcArguments.hpp"
#include "gc/shared/workerPolicy.hpp"
#include "runtime/globals.hpp"
@ -39,7 +39,7 @@
#include "runtime/java.hpp"
static size_t calculate_heap_alignment(size_t space_alignment) {
size_t card_table_alignment = CardTableRS::ct_max_alignment_constraint();
size_t card_table_alignment = CardTable::ct_max_alignment_constraint();
size_t page_size = UseLargePages ? os::large_page_size() : os::vm_page_size();
return MAX3(card_table_alignment, space_alignment, page_size);
}

View File

@ -24,7 +24,7 @@
*/
#include "precompiled.hpp"
#include "gc/shared/cardTableRS.hpp"
#include "gc/shared/cardTable.hpp"
#include "gc/shared/gcArguments.hpp"
#include "logging/log.hpp"
#include "runtime/arguments.hpp"
@ -73,7 +73,7 @@ size_t GCArguments::compute_heap_alignment() {
// byte entry and the os page size is 4096, the maximum heap size should
// be 512*4096 = 2MB aligned.
size_t alignment = CardTableRS::ct_max_alignment_constraint();
size_t alignment = CardTable::ct_max_alignment_constraint();
if (UseLargePages) {
// In presence of large pages we have to make sure that our