Hacker News new | ask | show | jobs
by poizan42 2524 days ago
But why would you want you RAM to sit unused? The OS uses all the RAM available for caching if nothing else wants it for something more important.
1 comments

Are memory-heavy applications able to detect true available memory? I could see an app that tries to scale itself to available memory running with reduced performance or refusing to run if it sees non-page-cache but evictable memory as unavailable.
You are over complicating.

In general applications don't manage their ram usage based on available resources they just take what they need until your system starts swapping.

The OS manages memory and evicts cache to make use for applications when they request it. The good thing about a cached file is that it is available on disk to be reread any time you like.

I've used applications that will specifically allocate (available memory * x) or similar because they or their plugins can't handle ENOMEM or the Windows equivalent, and they do not want to swap.
Those applications were broken anyways, see https://devblogs.microsoft.com/oldnewthing/20120118-00/?p=85...
Isn't that basically what browsers do these days?