3 ms·
It doesn't have a tracing GC (or at least, the primary portion isn't tracing). The garbage collector is outlined at https://nim-lang.org/docs/gc.html https://ni
by Varriount 9y ago
It doesn't have a tracing GC (or at least, the primary portion isn't tracing). The garbage collector is outlined at https://nim-lang.org/docs/gc.html https://nim-lang.org/docs/gc.html
- MichaelGG 9y agoIt says it has to scan the entire threadlocal heap with mark and sweep. What am I missing? Anyways I'm sorta being pedantic that it obviously has some sort of runtime. Maybe they meant to say not a runtime like a full VM ala Java?
- vinceguidry 9y agoThe whole language compiles to C, C++, or Javascript. It presumably uses whatever runtime the compiled-to language provides.
- MichaelGG 9y agoWell C doesn't ship with the GC described, so it must include some additional runtime beyond the C library.
- deleted 9y ago[deleted]
- dkarapetyan 9y ago> The GC is only triggered in a memory allocation operation. It is not triggered by some timer and does not run in a background thread. I think this is what D does as well. This means you have to be mindful of what you're doing and if you want few pauses then you need to perform all your allocations ahead of time or disable it entirely in certain sections.