Re:Garbage Collection
by sfink on Tuesday December 03, 2019 @02:28AM
(#21690582)
Ref counting uses additional memory to store the refcounts. And possibly more for the suspected set of the cycle collector.
GC uses additional memory to amortize collections over allocations. (Zero overhead means constantly collecting, using 2x steady state memory size is not uncommon.)
Overall, I think you're right, refcounting comes out ahead on memory usage. But it's not completely straightforward to determine.
GC uses additional memory to amortize collections over allocations. (Zero overhead means constantly collecting, using 2x steady state memory size is not uncommon.)
Overall, I think you're right, refcounting comes out ahead on memory usage. But it's not completely straightforward to determine.