3 ms·
It's not marketed as a GC, but exit(2) is fast and effective when used as one.
by pklausler 4y ago
It's not marketed as a GC, but exit(2) is fast and effective when used as one.
- saagarjha 4y agoNow you've pushed the job of cleaning up page tables to the OS.
- chrisseaton 4y agoBut that’s extremely easy - you go through a linear list once and free them all. You don’t even need to bring the contents from main memory to do it. (Exception is shared pages, not used for heap memory often.)
- saagarjha 4y agoIt's definitely easier, because you don't have interior pointers. But it's still work :)
- jeeeb 4y agoThe OS would have that job anyway.
- int_19h 4y agoIt's optimized for that, so just let it do its job. https://devblogs.microsoft.com/oldnewthing/20120105-00/?p=8683 https://devblogs.microsoft.com/oldnewthing/20120105-00/?p=86...
- game-of-throws 4y agoI wouldn't call it a GC. It's more like an arena allocator, with the arenas managed by the OS :)