4 ms·
Right, that's why moving collectors are only used in the young/fast generation, for reasons of space and time. - you don't want the 2x space overhead for your
by chubot 3y ago
Right, that's why moving collectors are only used in the young/fast generation, for reasons of space and time.
- you don't want the 2x space overhead for your entire heap
- I don't know that any copying/moving GCs are incremental. You just collect the young objects all at once -- the CLR says they aim to make it cost as much as a page fault.
I don't know the common policies offhand, but I imagine the young generation is like 512 KB to 4 MB, so it will fit in caches. The whole point is bump allocation and locality
I don't have experience with GCs where the mutator dereferences through a pointer -- my impression is that's rare, but I'm not sure.
In the normal Cheney collector, the forwarding pointers are only used during the algorithm itself. It has to update pointers for the mutator, but after that, the mutator does normal dereferencing.