2 ms·
free() is O(n) in the number of dead objects, and needs to defrag unless your object sizes are very stable. A GC can just copy the minority of live objects and
by erik_seaberg 9y ago
free() is O(n) in the number of dead objects, and needs to defrag unless your object sizes are very stable. A GC can just copy the minority of live objects and then reuse the whole arena.
- wahern 9y agoUh huh. And what's the O on the copying? And on the repeated heap walking?