For a recent PC game we pushed up to about 2.5 GB of data loaded at any time. (Windows allows a 32-bit program a maximum of 3 GB address space). On certain old min-spec machines this meant some page file swapping, but for most gamers that will fit in main memory.
That 2.5 GB of data was almost entirely textures, models, and audio. The executable itself along with all the associated libraries required less than 45MB, or just under 2% of the total size.
Adding a few bytes to the executable is generally not significant for a major game title.
Is that why games requires a certain amount of RAM because they contain a lot of instructions and also a lot of instructions that needs to be processed by the CPU?
You can write (and people have written) very small programs that process many terabytes of data. The size of the program does not directly correspond to the data needs.
If you want some fun examples, look back to the old PC demoscene programmers. Most were written in hand-crafted assembly while carefully watching their binary size. Many of them wrote procedural graphics. Quite a few of the later programs relied on D3D for their graphics engines. A small number of them designed systems that extended to the full amount of available memory on the system, capping out at the system's addressable limits. Re-running some of those old demoscene programs that are just a few kilobytes in size and end up processing gigabytes of graphics, well, they are just amazing. They are basically screensavers, but still amazing.
Or for a non-games industry... Some quick searching shows Walmart averages over 1 million point of sale transactions per hour, with 2.5 petabytes of financial transaction data. I doubt their point-of-sale executable is more than a few megabytes, just like game executables. The Large Hadron Collider generates 40 terabytes of sensor data per second. They do a lot of processing to handle it, but again, the executables probably aren't large. A commercial jet generates 10 terabytes of data every 30 minutes of flight time, most of it is displayed to the pilot continuously, then discarded.
It is all about the data. There is lots of it, everywhere.
Edited by frob, 07 March 2014 - 12:58 AM.
Typos. Typos everwhere. Time for bed.