mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-22 04:39:31 -10:00
The problem was that the assert didn't take into account the fact that some regions may be on the decommit list already due to aging of regions. (#66495)
This commit is contained in:
1 parent
48e431b123
commit
8ced105bdf
1 file changed
+6
-1
@@ -12414,6 +12414,9 @@ void gc_heap::distribute_free_regions()
|
||||
|
||||
if (num_regions_to_decommit[kind] > 0)
|
||||
{
|
||||
// remember how many regions we had on the decommit list already due to aging
|
||||
size_t num_regions_to_decommit_before = global_regions_to_decommit[kind].get_num_free_regions();
|
||||
|
||||
// put the highest regions on the decommit list
|
||||
global_region_allocator.move_highest_free_regions (num_regions_to_decommit[kind]*region_factor[kind],
|
||||
kind == basic_free_region,
|
||||
@@ -12424,7 +12427,9 @@ void gc_heap::distribute_free_regions()
|
||||
|
||||
if (kind == basic_free_region)
|
||||
{
|
||||
assert (global_regions_to_decommit[kind].get_num_free_regions() == (size_t)num_regions_to_decommit[kind]);
|
||||
// we should now have num_regions_to_decommit[kind] regions more on the decommit list
|
||||
assert (global_regions_to_decommit[kind].get_num_free_regions() ==
|
||||
num_regions_to_decommit_before + (size_t)num_regions_to_decommit[kind]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user