Recently, I needed to test various kernel boot-options with a live system and had to install a program to check system information on every boot (I did not have a USB drive available and the CD was the more reliable choice at that moment).

After a handful of installations, I began to wonder, where the program is actually "saved", since the CD does not have a persistent area and it's also possible to create USB drives without one. Also, it's possible to download files or make screenshots with a non-persistent live system and temporarily save them in the user directories.

Where are these files actually saved? Are they loaded into the RAM, so the maximum available memory for the live system is actually the RAM capacity of the machine? Are installed programs stored in the CPU cache or somewhere else entirely? Or is that information possibly written on empty space of the CD medium? It obviously can't be unallocated hard drive space, since live systems also work with fully encrypted or even completely without hard drives installed.