8379442: GenShen: Fix two errors introduced by 29039

Reviewed-by: xpeng, serb, wkemper
This commit is contained in:
Kelvin Nilsen 2026-03-09 21:58:50 +00:00
parent 46a5ed9908
commit 6a8e9530fe
2 changed files with 2 additions and 2 deletions

View File

@ -739,7 +739,7 @@ size_t ShenandoahAdaptiveHeuristics::accelerated_consumption(double& acceleratio
if (i > 0) {
// first sample not included in weighted average because it has no weight.
double sample_weight = x_array[i] - x_array[i-1];
weighted_y_sum = y_array[i] * sample_weight;
weighted_y_sum += y_array[i] * sample_weight;
total_weight += sample_weight;
}
y_sum += y_array[i];

View File

@ -2848,7 +2848,7 @@ size_t ShenandoahFreeSet::reserve_regions(size_t to_reserve, size_t to_reserve_o
_partitions.leftmost(ShenandoahFreeSetPartitionId::OldCollector),
_partitions.rightmost(ShenandoahFreeSetPartitionId::OldCollector));
old_region_count++;
assert(ac = ShenandoahHeapRegion::region_size_bytes(), "Cannot move to old unless entire region is in alloc capacity");
assert(ac == ShenandoahHeapRegion::region_size_bytes(), "Cannot move to old unless entire region is in alloc capacity");
mutator_allocatable_words -= ShenandoahHeapRegion::region_size_words();
continue;
}