2 ms·
Would it be possible for the allocator/GC to know what allocations are made within a request and make a generation for specifically for it? Allocations too big
by hgo 2y ago
Would it be possible for the allocator/GC to know what allocations are made within a request and make a generation for specifically for it? Allocations too big to fit would be made like usual
- byroot 2y agoThat's already what we effectively have. Since objects cannot be promoted to the old generation inside the request cycle, objects in the new gen are request allocated objects. So if we were to eagerly trigger a minor GC after a request, we'd have very little objects to scan, and only need to sweep garbage, which is only a small fraction of time spent in GC.