Dirty Coding tricks used in Production Video Games
Ok, this is just golden.<p><i>We were still 1.5 MB over the memory limit!<p>At this point one of the most experienced programmers in the team, one who had survived many years of development in the "good old days," decided to take matters into his own hands. He called me into his office, and we set out upon what I imagined would be another exhausting session of freeing up memory.<p>Instead, he brought up a source file and pointed to this line:</i><p>static char buffer[1024 * 1024 * 2];<p><i>"See this?" he said. And then deleted it with a single keystroke. Done!<p>He probably saw the horror in my eyes, so he explained to me that he had put aside those two megabytes of memory early in the development cycle. He knew from experience that it was always impossible to cut content down to memory budgets, and that many projects had come close to failing because of it. So now, as a regular practice, he always put aside a nice block of memory to free up when it's really needed. </i>