I worked on games for the original PlayStation, and one of the requirements for release was that your title would be able to run for 48 hours without crashing (the soak test). A big issue we ran into as developers is that we only had 2 MB of memory, and unlike cartridges, you had to load all your data into RAM. Since we dynamically allocated memory, you would quickly run into memory fragmentation issues. If I have 2 MB of memory, I could have 1.5MB free, but I would be unable to allocate a 750k block because it could be laid out with 500KB free, a small block of used memory, another 500k, another a small used block, and then the rest of memory. If you end up in this position, there aren’t a huge number of good options, and several engineers started thinking about how to carefully allocate the memory so that we wouldn’t end up in that position. Instead, I found a way to fix it with a scorched earth policy. I could soft reboot the PlayStation which resets it, but avoids the Sony logo at startup. I would write the current player data into a special save game, do the soft reboot, which would launch the game. The first thing the game would do is look for the special save, and use that to skip various menus and the front end and just drop you into the game. A simple soft reboot per level increased our load times by a second or two, but safely reset our memory. Years later, after talking with other programmers, it ends up that many people had discovered this trick, and it used to get through the soak test.
As a side note, memory issues were a huge problem that is largely invisible to most software engineering. To give you an idea on how complex the solutions are, check out how Naughty Dog solved this on Crash Bandicoot:
https://news.ycombinator.com/item?id=9737156