Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LizBing committed Dec 16, 2023
1 parent 4e44ba2 commit 4aa6f9f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/hotspot/share/gc/g1/g1ConcurrentRefine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,11 @@ jint G1ConcurrentRefineThreadControl::initialize(G1ConcurrentRefine* cr) {
_cr = cr;

if (max_num_threads() > 0) {
_threads.push(create_refinement_thread(0, true));
if (_threads.at(0) == nullptr) {
uint ensure_id = UseDynamicNumberOfGCThreads ? 0 : max_num_threads() - 1;
if (!ensure_threads_created(ensure_id, true)) {
vm_shutdown_during_initialization("Could not allocate primary refinement thread");
return JNI_ENOMEM;
}

if (!UseDynamicNumberOfGCThreads) {
if (!ensure_threads_created(max_num_threads() - 1, true)) {
vm_shutdown_during_initialization("Could not allocate refinement threads");
return JNI_ENOMEM;
}
}
}

return JNI_OK;
Expand Down

0 comments on commit 4aa6f9f

Please sign in to comment.