3 ms·
How does it accomplish tracing GC without a runtime?
by MichaelGG 10y ago
How does it accomplish tracing GC without a runtime?
- Varriount 10y agoIt 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 10y 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 10y agoThe whole language compiles to C, C++, or Javascript. It presumably uses whatever runtime the compiled-to language provides.
- MichaelGG 10y agoWell C doesn't ship with the GC described, so it must include some additional runtime beyond the C library.
- deleted 10y ago[deleted]
- dkarapetyan 10y 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.
- Varriount 10y agoIt 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
- Varriount 10y agoIt 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