5 ms·
Ironically, by using modern tools.
by phist_mcgee 4y ago
Ironically, by using modern tools.
- systemvoltage 4y agoI think revisiting vintage technologies with better modern tools = Win. It takes advantage of sharp hindsight and correct what was bad, and more importantly keep what worked.
- jbirer 4y agoModern tools are good, but the culture around it is pretty toxic, and in my own opinion, cringy. 10 years ago you would get booed for saying things like "Unused RAM is wasted ram, so let's build this in Electron". I am happy to see a pushback.
- saagarjha 4y ago“Unused RAM is wasted RAM” is only relevant if you’re writing an OS.
- int_19h 4y agoIt's also relevant if you're writing software that's intended to be run side by side with other software.
- saagarjha 4y agoIt's relevant in the sense that you should not be using that as your guiding principle, yes.
- account42 4y agoDo any operating systems have an API for cache-only memory that the OS is free to discard at will? Maybe there should be because the other end of the spectrum is unneccessarily loading the same things over and over again even though there is lots of excess memory available. Many games are guilty of this, not really taking advantage of overspecced systems.
- saagarjha 4y agoMost OSes will have this but it's difficult to use as a general API. The main use case is "I freed these pages and will not use them anymore, save on the bookeeping". Anything beyond that is a little dicey because if the OS does reclaim the pages you'll take a fault trying to hit the cache, which can be bad if it happens at an inopportune time. And properly signaling this to applications is hard (SIGSEGV is not a very ergonomic interface).
- trashburger 4y agoActually, Serenity has this, called "purgeable memory". You map your memory in a special way, and have to re-map it to use it. If the system needs more memory, it purges those pages, making it possible to use it as a cache :^)
- account42 4y agoNeat, found this for a Linux implementation: https://nullprogram.com/blog/2019/12/29/ https://nullprogram.com/blog/2019/12/29/
- nix23 4y ago>Unused RAM is wasted ram, Sorry but you get that wrong, that's just meant for file buffer and caches etc. NOT actually bloat.