File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -34695,7 +34695,7 @@ void gc_heap::background_grow_c_mark_list()
34695
34695
assert (new_c_mark_list);
34696
34696
memcpy (new_c_mark_list, c_mark_list, c_mark_list_length*sizeof(uint8_t*));
34697
34697
c_mark_list_length = c_mark_list_length*2;
34698
- delete c_mark_list;
34698
+ delete[] c_mark_list;
34699
34699
c_mark_list = new_c_mark_list;
34700
34700
}
34701
34701
}
Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ UINT32 STUB_COLLIDE_WRITE_PCT = 100;
103
103
UINT32 STUB_COLLIDE_MONO_PCT = 0 ;
104
104
#endif // STUB_LOGGING
105
105
106
+ FastTable::NumCallStubs_t FastTable::NumCallStubs;
107
+
106
108
FastTable* BucketTable::dead = NULL ; // linked list of the abandoned buckets
107
109
108
110
DispatchCache *g_resolveCache = NULL ; // cache of dispatch stubs for in line lookup by resolve stubs.
@@ -3346,7 +3348,7 @@ void BucketTable::Reclaim()
3346
3348
while (list)
3347
3349
{
3348
3350
size_t next = list->contents [CALL_STUB_DEAD_LINK];
3349
- delete [] ( size_t *) list;
3351
+ delete list;
3350
3352
list = (FastTable*) next;
3351
3353
}
3352
3354
}
Original file line number Diff line number Diff line change @@ -1567,8 +1567,7 @@ class FastTable
1567
1567
while (size < numberOfEntries) {size = size<<1 ;}
1568
1568
// if (size == CALL_STUB_MIN_ENTRIES)
1569
1569
// size += 3;
1570
- size_t * bucket = new size_t [(sizeof (FastTable)/sizeof (size_t ))+size+CALL_STUB_FIRST_INDEX];
1571
- FastTable* table = new (bucket) FastTable ();
1570
+ FastTable* table = new (NumCallStubs, size) FastTable ();
1572
1571
table->InitializeContents (size);
1573
1572
return table;
1574
1573
}
@@ -1592,6 +1591,15 @@ class FastTable
1592
1591
// we have an unused cell to use as a temp at bucket[CALL_STUB_DEAD_LINK==2],
1593
1592
// and the table starts at bucket[CALL_STUB_FIRST_INDEX==3],
1594
1593
size_t contents[0 ];
1594
+
1595
+ void * operator new (size_t ) = delete ;
1596
+
1597
+ static struct NumCallStubs_t {} NumCallStubs;
1598
+
1599
+ void * operator new (size_t baseSize, NumCallStubs_t, size_t numCallStubs)
1600
+ {
1601
+ return ::operator new (baseSize + (numCallStubs + CALL_STUB_FIRST_INDEX) * sizeof (size_t ));
1602
+ }
1595
1603
};
1596
1604
#ifdef _MSC_VER
1597
1605
#pragma warning(pop)
You can’t perform that action at this time.
0 commit comments