Why use swap when there is RAM free?

Chris Jones jonesc at hep.phy.cam.ac.uk
Fri Aug 14 15:21:14 UTC 2009


> _You_ might know you'll need it.  The swapper doesn't.  Many pages that end 
> up in swap might never be used again.  I remember, in the days when we had 
> to worry about such things, on VMS I had a way to mark pages as discardable 
> - so that code or data only needed at startup could be just deleted rather 
> than swapped out when the memory was needed by something else.  Even if 
> Linux has this capability, I suspect most programmers just wouldn't bother 
> with it.

Hmm, maybe I miss the point but why not just free() the memory back to 
the system once your code is finished with them ? Surely thats the 
cleanest way to deal with this...

Chris





More information about the ubuntu-users mailing list