Re:How memory maps (mmap) deliver faster file access in Go
by zozbot234 on Saturday October 25, 2025 @04:48AM
(#45702304)
> MADV_FREE is also extremely expensive.
It's quite expensive to free pages under memory pressure (though it's not clear that there's any other choice to be made), but if the pages are never freed it should be cheap, AIUI.
Hardware reference counting of memory allocations would be very interesting. It would be shockingly simple to implement compared to many other features hardware already has to tackle.