4 ms·
GC systems delay collecting garbage because it is unproductive overhead. For each object constructed, it is quicker to claim fresh memory than to clean up garba
by angiosperm 3y ago
GC systems delay collecting garbage because it is unproductive overhead. For each object constructed, it is quicker to claim fresh memory than to clean up garbage and reclaim its memory. Thus, garbage accumulates, amounting to memory claimed by the process, but not storing anything useful to the program. In practice, much of the memory claimed by a GC program, most of the time, is such garbage.
- xigoi 3y agoYou’re making a lot of assumptions about the specific GC algorithm used. Those based on reference counting clean up immediately when possible.