
Thanks to Google Summer of Code student Zhao Shuai,
Haiku now has support for a swap file.
"As of revision 27233 it is enabled by default, using a swap file twice the size of the accessible RAM. The swap file size can be changed (or swap support disabled) via the VirtualMemory preferences. Swap support finally allows building Haiku in Haiku on a box with less than about 800 MB RAM, as long as as the swap file is large enough. [Ingo Weinhold] tested this on a Core 2 Duo 2.2 GHz with 256 MB RAM (artificially limited) and a 1.5 GB swap file. Building a standard Haiku image with two jam jobs (jam -j2) took about 34 minutes. This isn't particularly fast, but Haiku is not well optimized yet." The swap implementation borrows heavily from that of FreeBSD.
Member since:
2007-03-31
it depends on what happens if the system crashes. some OS still dump the whole OS completely in SWAP before dying since you don't want it saved as a regular file on the filesystem.
When rebooting, the dump in swap is then saved into a regular file.
basically swap = 2xRAM is a bad idea, but there are sometimes reaons why it's space is needed. Don't know how HAIKU does this though.