News for hackers. Stuff that matters.
Re:Librebooting the ThinkPad T480 by BenjiWiebe on Friday December 13, 2024 @09:43AM (#42408831)
No, unused memory should always be used as cache if it has no other use at the moment. It's wasted otherwise.
Re:Librebooting the ThinkPad T480 by UweSchmidt on Friday December 13, 2024 @11:06AM (#42409785)
Is that generally how unused memory is used, and will this kind of "cache" be released if another application truly needs it to load actually vital things?
Re:Librebooting the ThinkPad T480 by dewey on Friday December 13, 2024 @12:27PM (#42410464)
Yes, that’s the main job of the OS memory management.
Re:Librebooting the ThinkPad T480 by zamadatix on Friday December 13, 2024 @03:36PM (#42412130)
I think a lot of this comes down to semantics confusion for most people. Intuitively one would assume "unused" memory would be the inverse of "used" memory, with not everyone thinking what even counts as "used" or "unused" in the first place. In reality on macOS/Windows/Linux "used" memory is counted as a specific type of usage (e.g. processes/system/hardware), cached things are counted as cached, and there are multiple ways to refer to which "unused" portion you mean (e.g. free vs available) as well as anywhere between a half to several dozen ultra specific terms to break things up further with which probably don't matter in context.

Once you clear the semantics hurdle it's surprising how much people are in agreement that "used" should be optimised, "cached" should fill as much else as possible, and often having large amounts of "free" is generally a waste. The only remaining debate tends to center on how much cache really matters with a fast disk and what percentile of workload burst should you worry about how much "free" you have left after.