Open Bug 1886280 Opened 2 years ago Updated 1 year ago

LifoAlloc::releaseAll() optimization for StoreBuffer is now ineffective

Categories

(Core :: JavaScript: GC, task, P2)

task

Tracking

()

People

(Reporter: sfink, Unassigned)

References

(Blocks 1 open bug)

Details

We do:

void Nursery::traceRoots() {
  StoreBuffer sb;
  std::swap(gc->storebuffer, sb);
  ...do a minor GC using sb...
  sb.releaseAll();
}

So sb does a releaseAll to move all of its chunks into its unused_ list, then immediately falls out of scope and frees everything. Everything will need to be freshly allocated when gc->storebuffer is populated. Which is a little better for memory usage, a little worse for perf. (It's tempting to have a releaseAllAndFreeACouple() that moves almost everything to unused but frees a few chunks so that we don't stick to the high water mark forever.)

Severity: -- → N/A
Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.