News for hackers. Stuff that matters.
Re:Modern garbage collection: Part 2 by cmrdporcupine on Saturday December 14, 2019 @10:04AM (#21789794)
The other question is: can I at least time this GC so it doesn't overlap the refresh interval and skip a frame? Because 1ms may not be significant if it lands in the middle of the 16ms period, but if it lands at the end you've just produced jitter.

So I'd think a GC designed for a gaming system would take this into account; incremental concurrent GC that can be timed to happen at the start of each each frame interval and be paused if it gets close to the end.

Re:Modern garbage collection: Part 2 by markdog12 on Saturday December 14, 2019 @01:41PM (#21791222)
I remember the oddly named System.pauseForGCIfCollectionImminent() AS3 (Flash) function:

https://help.adobe.com/en_US/FlashPlatform/reference/actions...

Re:Modern garbage collection: Part 2 by corysama on Saturday December 14, 2019 @01:30PM (#21791155)
You can manually trigger GC in Lua. I’ve used this to trigger light GC work every frame in some games to buy more consistent GC times (no spikes) at the cost of higher average times.
Re:Modern garbage collection: Part 2 by brighteyes on Saturday December 14, 2019 @01:35PM (#21791194)
Chrome does this too, it times GCs for when it has free time or is rendering in another thread, https://blog.chromium.org/2015/12/smarter-garbage-collection...