Skip to content

Commit

Permalink
fix a regression introduced by Refactor handling of non-SOH generatio…
Browse files Browse the repository at this point in the history
…ns (#1688)

this is supposed to get the user allocations, before #1688 it was getting gen0 and gen3. with the refactor it should get gen0 and all UOH allocations.
  • Loading branch information
Maoni0 authored May 4, 2020
1 parent 0c211fb commit 2b3de4f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/coreclr/src/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15020,11 +15020,12 @@ size_t gc_heap::get_total_allocated_since_last_gc()
// Gets what's allocated on both SOH, LOH, etc that hasn't been collected.
size_t gc_heap::get_current_allocated()
{
size_t current_alloc = 0;
for (int i = max_generation; i < total_generation_count; i++)
dynamic_data* dd = dynamic_data_of (0);
size_t current_alloc = dd_desired_allocation (dd) - dd_new_allocation (dd);
for (int i = uoh_start_generation; i < total_generation_count; i++)
{
dynamic_data* dd = dynamic_data_of (i);
current_alloc = dd_desired_allocation (dd) - dd_new_allocation (dd);
current_alloc += dd_desired_allocation (dd) - dd_new_allocation (dd);
}
return current_alloc;
}
Expand Down

0 comments on commit 2b3de4f

Please sign in to comment.