Just to illustrate the fun working with Linux.
Once upon time I was building Openoffice on Gentoo, the box had not much resources, I think it had 1 GiB of RAM and 512 MiB of swap. I had conky running on the desktop and I saw memory filled up and swap filling up, too. Compiling Openoffice is time consuming, I did not want it to be killed by OOM killer.
I quickly did
this created 1 gigabyte file, then I made it swap space and finally I activated it and voila! My compilation process was saved.
dd if=/dev/zero of=/swapfile bs=1024 count=1M