I have recently been trying out a live distro (the awesome, eye-candy-licious, Sabayon 3.3 liveDVD), and I was having difficulties getting my net connection working. Well, I noticed what I thought was an error in a shell script, so I editted it, saved it, and tried to run it. The thing is, that saving it actually worked! Obviously the changes were reverted the next time I booted the DVD, but whilst in the same session, the changes to the file actually stuck.

My question is, how does this work? No changes were written to my hard drive (obviously), but the file had changed, and this seems impossible. Do liveCDs keep a copy of all changed files in RAM in order to remember the changes? What if I were to download and install some program that was bigger than my RAM -- would the OS crash and burn? Is it even possible to d/load and install a program on a liveDVD (I realise rebooting a live distro reverts all changes, but I'm asking if it's possible to do that within a single session)?