Skip to content

Commit f57033d

Browse files
committed
JDK-21-specific additions
1 parent 0aebb17 commit f57033d

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/hotspot/share/gc/g1/g1Allocator.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class G1Allocator : public CHeapObj<mtGC> {
122122
// current allocation region, and then attempts an allocation using a new region.
123123
inline HeapWord* attempt_allocation_locked(uint node_index, size_t word_size);
124124

125-
inline HeapWord* attempt_allocation_force(size_t word_size);
125+
inline HeapWord* attempt_allocation_force(uint node_index, size_t word_size);
126126

127127
size_t unsafe_max_tlab_alloc();
128128
size_t used_in_alloc_regions();

src/hotspot/share/gc/g1/g1Allocator.inline.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ inline HeapWord* G1Allocator::attempt_allocation_locked(uint node_index, size_t
6969
return result;
7070
}
7171

72-
inline HeapWord* G1Allocator::attempt_allocation_force(size_t word_size) {
73-
uint node_index = current_node_index();
72+
inline HeapWord* G1Allocator::attempt_allocation_force(uint node_index, size_t word_size) {
7473
return mutator_alloc_region(node_index)->attempt_allocation_force(word_size);
7574
}
7675

src/hotspot/share/gc/g1/g1CollectedHeap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ HeapWord* G1CollectedHeap::attempt_allocation_slow(uint node_index, size_t word_
438438
if (GCLocker::is_active_and_needs_gc() && policy()->can_expand_young_list()) {
439439
// No need for an ergo message here, can_expand_young_list() does this when
440440
// it returns true.
441-
result = _allocator->attempt_allocation_force(word_size);
441+
result = _allocator->attempt_allocation_force(node_index, word_size);
442442
if (result != nullptr) {
443443
return result;
444444
}

0 commit comments

Comments
 (0)