Re:Reference count, don't garbage collect
by pklausler on Friday July 29, 2022 @07:24PM
(#32282826)
It's not marketed as a GC, but exit(2) is fast and effective when used as one.
[ Parent
| on HN ]
Re:Reference count, don't garbage collect
by game-of-throws on Friday July 29, 2022 @07:59PM
(#32283032)
I wouldn't call it a GC. It's more like an arena allocator, with the arenas managed by the OS :)
Now you've pushed the job of cleaning up page tables to the OS.
Re:Reference count, don't garbage collect
by chrisseaton on Friday July 29, 2022 @07:55PM
(#32283003)
But 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.)
It's definitely easier, because you don't have interior pointers. But it's still work :)
It's optimized for that, so just let it do its job.
https://devblogs.microsoft.com/oldnewthing/20120105-00/?p=86...