News for hackers. Stuff that matters.
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.
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 :)
Re:Reference count, don't garbage collect by saagarjha on Friday July 29, 2022 @07:51PM (#32282987)
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.)

Re:Reference count, don't garbage collect by saagarjha on Friday July 29, 2022 @08:11PM (#32283097)
It's definitely easier, because you don't have interior pointers. But it's still work :)
Re:Reference count, don't garbage collect by int_19h on Saturday July 30, 2022 @02:55AM (#32284893)
It's optimized for that, so just let it do its job.

https://devblogs.microsoft.com/oldnewthing/20120105-00/?p=86...

Re:Reference count, don't garbage collect by jeeeb on Saturday July 30, 2022 @12:05AM (#32284192)
The OS would have that job anyway.