Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit Accounting related changes #100380

Merged
merged 7 commits into from
May 22, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Make sure committed bytes got reduced in case we fail to grow the bri…
…ck card table
  • Loading branch information
cshung committed May 8, 2024
commit 775fd41b97a2452b5469692ffdb4f619b7695648
13 changes: 12 additions & 1 deletion src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6017,7 +6017,18 @@ gc_heap::get_segment (size_t size, gc_oh_num oh)

if (gc_heap::grow_brick_card_tables (start, end, size, result, __this, uoh_p) != 0)
{
virtual_free (mem, size);
// release_segment needs the flags to decrement the proper bucket
size_t flags = 0;
if (oh == poh)
{
flags = heap_segment_flags_poh;
}
else if (oh == loh)
{
flags = heap_segment_flags_loh;
}
result->flags |= flags;
release_segment (result);
return 0;
}
}
Expand Down