Skip to content

Commit a1eefbb

Browse files
Qualify sorted_table allocation with nothrow (#57467)
It's clearly what we intended, given the following line.
1 parent 6c47cf8 commit a1eefbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/coreclr/gc/gc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3299,7 +3299,7 @@ sorted_table::make_sorted_table ()
32993299
size_t size = 400;
33003300

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

0 commit comments

Comments
 (0)