Hacker News new | ask | show | jobs
by nutjob123 4309 days ago
`"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.

Instead, he brought up a source file and pointed to this line:

static char buffer[1024 * 1024 * 2]; "See this?" he said. And then deleted it with a single keystroke. Done!

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.`

1 comments

Budget allocation is really the thing to do - this way on the code side, or dummy sound file, dummy texture, dummy big model on the art side.

It's been done this way, and it'll be done in the future.