3 ms·
A GC still has those same delays when freeing a large object graph (assuming that large object graph is in the tenured generation). They're just sometimes incre
by danieldk 11y ago
A GC still has those same delays when freeing a large object graph (assuming that large object graph is in the tenured generation). They're just sometimes incrementalized or done in a background thread. Your malloc implementation could do that too.
Of course, I was just making an argument against 'immediately deallocating is always the best strategy'. It's clear that malloc()/free() could implement the same behaviour.
free is usually implemented with a free list.
Sorry, I was a bit vague: I was referring to moving garbage collectors, where one of the motivations was to be more performant with a lot of short-lived objects.