GC fixes/improvements

- Have a real finalizer stage for destroying objects instead of mixing them
  in to the sweep stage.
- Base GC rate on a running average of the allocation rate instead of basing
  it on the amount of time taken since the last sweep started.
- More GC stats for better tweaking.
This commit is contained in:
Marisa Heit 2022-11-06 11:19:26 -06:00 committed by Christoph Oelckers
commit 7f899bd412
4 changed files with 379 additions and 171 deletions

View file

@ -221,6 +221,11 @@ public:
Counter = 0;
}
void ResetAndClock()
{
Counter = -static_cast<int64_t>(rdtsc());
}
void Clock()
{
int64_t time = rdtsc();