3 ms·
Unused data is by definition unreachable from any GC roots and should not incur additional tracing work.
by rbehrends 9y ago
Unused data is by definition unreachable from any GC roots and should not incur additional tracing work.
- ori_b 9y agoThat means that the heap grows with the highest address allocated within it, unless you incur additional overhead for copying the data around.
- rbehrends 9y agoThis is exactly what a generational GC does. Once the minor heap fills up, it evicts data that is still in use and moves it to the major heap. Note that this overhead is only incurred for data still in use. We are not comparing memory management strategies in general, but the special case of temporarily allocating data that can be thrown away at the end.
- ori_b 9y agoIt is also not what an arena allocator does.
- deleted 9y ago[deleted]