Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Unused data is by definition unreachable from any GC roots and should not incur additional tracing work.


That means that the heap grows with the highest address allocated within it, unless you incur additional overhead for copying the data around.


This 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.


It is also not what an arena allocator does.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: