Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21507,10 +21507,13 @@ int gc_heap::generation_to_condemn (int n_initial,
}

#ifdef USE_REGIONS
if (!try_get_new_free_region())
if (!check_only_p)

@cshung cshung Jul 15, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: Using && to avoid changing many lines?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That annoyed me a bit too, but I followed the pattern at line 21544 instead. I assumed that it was to make it clear by separating the "mode" of the function and the check itself, which made sense to me.

{
dprintf (GTC_LOG, ("can't get an empty region -> full compacting"));
last_gc_before_oom = TRUE;
if (!try_get_new_free_region())
{
dprintf (GTC_LOG, ("can't get an empty region -> full compacting"));
last_gc_before_oom = TRUE;
}
}
#endif //USE_REGIONS

Expand Down