Skip to content
Permalink
Browse files
8277985: G1: Compare max_parallel_refinement_threads to UINT_MAX
Reviewed-by: kbarrett, tschatzl
  • Loading branch information
lkorinth committed Dec 2, 2021
1 parent dc2abc9 commit 7c4ef3abaff55b29dddc50f2aea8a04a3214f9fb
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/hotspot/share/gc/g1/g1Arguments.cpp
@@ -243,7 +243,7 @@ void G1Arguments::initialize() {
// the refcount in G1CardSetContainer.
uint max_parallel_refinement_threads = G1ConcRefinementThreads + G1DirtyCardQueueSet::num_par_ids();
uint const divisor = 3; // Safe divisor; we increment by 2 for each claim, but there is a small initial value.
if (max_parallel_refinement_threads > UINTPTR_MAX / divisor) {
if (max_parallel_refinement_threads > UINT_MAX / divisor) {
vm_exit_during_initialization("Too large parallelism for remembered sets.");
}
}

1 comment on commit 7c4ef3a

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 7c4ef3a Dec 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.