Skip to content

Commit

Permalink
Qualify sorted_table allocation with nothrow (dotnet#57467)
Browse files Browse the repository at this point in the history
It's clearly what we intended, given the following line.
  • Loading branch information
MichalStrehovsky authored Aug 16, 2021
1 parent 6c47cf8 commit a1eefbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3299,7 +3299,7 @@ sorted_table::make_sorted_table ()
size_t size = 400;

// allocate one more bk to store the older slot address.
sorted_table* res = (sorted_table*)new char [sizeof (sorted_table) + (size + 1) * sizeof (bk)];
sorted_table* res = (sorted_table*)new (nothrow) char [sizeof (sorted_table) + (size + 1) * sizeof (bk)];
if (!res)
return 0;
res->size = size;
Expand Down

0 comments on commit a1eefbb

Please sign in to comment.