does racket have a realtime gc?
@macocio I must admit I don’t know anything about GC in racket but the racket documentation has a section on memory management which says, The Racket implementation is available in three variants: 3m, CGC, and CS. The 3m and CS variants use a modern, generational garbage collector that makes allocation relatively cheap for short-lived objects. The CGC variant uses a conservative garbage collector which facilitates interaction with C code at the expense of both precision and speed for Racket memory management. The 3m variant is currently the standard one.
That’s in the Racket Guide (Section 19.11) https://docs.racket-lang.org/guide/performance.html
I don’t know if that helps.
@macocio what people mean by real-time gc varies, but the regular collector can be incremental which is often what you need for games for example
@samth I’ve had it on using (collect-garbage 'incremental)
but it still has noticeable pauses of >200 ms
Also, repeatedly calling that with glfw causes slowdown and eventually a crash due to some mmap stuff (at work, dont have logs)
Are those the incremental pauses?
Or are you still seeing major collections
I’m not sure, I’ll have to turn on gc logging and I’ll check
@samth, yup, MAJ events still happen :open_mouth:
GC: 0:MAJ @ 234,450K[+66,438K](+12,460K); free 44,135K[-43,063K] 101ms @ 9273
GC: 0:MAJ @ 198,506K[+101,310K](+12,456K); free 12,155K[+5,838K] 293ms @ 9387
... (some time later)
mprotect failed: 7f705ccf8000, 16384, 1, 12
Aborted (core dumped)