Comment 5 for bug 1096453

Revision history for this message
SirVer (sirver) wrote :

Okay, I agree that fixing memory leaks when loading and creating objects should be properly done. I disagree that the solution should be a catch all list - instead we need to find each individual leak i fear. One solution could be to make a small lua map that creates a few buildings, let the game run for a few minutes and terminates the game - this could then be run with valgrind in an automatic fashion and provide benchmark.

Your top analysis is flawed: when a program free()s memory, it will still be listed as used by the program until the OS reclaims it. Gauging 'real' memory usage without a malloc() library is actually pretty hard. you could try the smem tool under linux. See also the top rated answer to http://stackoverflow.com/questions/4802481/how-to-see-top-processes-by-actual-memory-usage.