3 ms·
> This is because the GC will move objects around in memory Not necessarily, you could use (and guarantee) a non-moving GC. Moving is but one of the attributes
by masklinn 10y ago
> This is because the GC will move objects around in memory
Not necessarily, you could use (and guarantee) a non-moving GC. Moving is but one of the attributes/details you can use for your GC.
- mikeash 10y agoAnd this is definitely not just theoretical. Any conservative collector must also be non-moving. The Boehm GC for C and C++ and Apple's GC for Objective-C are both existing examples.
- masklinn 10y agoIIRC Go's GC is also non-moving for now (or has that changed in a recent version? I believe it was still non-moving around 1.5)