I didn’t know Unity uses boehm! That’s very interesting. Unity games usually run pretty well, though there are some hiccups from time to time, I wonder if it’s the GC…
I tried enabling incremental collection in the past. Here’s me doing it on Mac OSX:
fun enable_incremental = GC_enable_incremental
fun is_incremental_mode = GC_is_incremental_mode : Int
$ bin/crystal foo.cr
GC Warning: Memory unmapping is disabled as incompatible with MPROTECT_VDB
GC Warning: Can't turn on GC incremental mode as fork() handling requested
So I couldn’t turn it on.
It seems to work (we get 1 as an output) but it also prints a warning.
I never continued playing with it because it doesn’t work on a mac and I only have a mac.