Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why would you enable swap?


I assume he sees "virtual memory", and jumps to thinking "swap". Which is rather common, but arguably a mistake.

Virtual memory is what allows for copy on write pages when forking. It is the preferred basis for implementing memory mapped files. It allows for sharing a single copy of shared library in ram, without causing everything to break if one program decides it wants to patch "its" copy of the library in memory.

Yeah sure it allows for paging out anonymous memory too, but that is hardly its sole function.


Correct, this was my (apparently very widespread) misconception that I just corrected with a bit o' googlin'




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: