11/*
2- * Copyright (c) 2019, 2025 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2019, 2026 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
2323 */
2424
2525#include " gc/g1/g1CollectionSetCandidates.inline.hpp"
26- #include " gc/g1/g1CollectionSetChooser.hpp"
2726#include " gc/g1/g1HeapRegion.inline.hpp"
2827#include " utilities/growableArray.hpp"
2928
@@ -250,8 +249,9 @@ void G1CollectionSetCandidates::sort_marking_by_efficiency() {
250249 _from_marking_groups.verify ();
251250}
252251
253- void G1CollectionSetCandidates::set_candidates_from_marking (G1HeapRegion** candidates,
254- uint num_candidates) {
252+ void G1CollectionSetCandidates::set_candidates_from_marking (GrowableArrayCHeap<G1HeapRegion*, mtGC>* candidates) {
253+ uint num_candidates = candidates->length ();
254+
255255 if (num_candidates == 0 ) {
256256 log_debug (gc, ergo, cset) (" No regions selected from marking." );
257257 return ;
@@ -273,7 +273,7 @@ void G1CollectionSetCandidates::set_candidates_from_marking(G1HeapRegion** candi
273273 current = new G1CSetCandidateGroup ();
274274
275275 for (uint i = 0 ; i < num_candidates; i++) {
276- G1HeapRegion* r = candidates[i] ;
276+ G1HeapRegion* r = candidates-> at (i) ;
277277 assert (!contains (r), " must not contain region %u" , r->hrm_index ());
278278 _contains_map[r->hrm_index ()] = CandidateOrigin::Marking;
279279
0 commit comments