Some of you might recall I had issues running my application (game) on a slower machine (WinXP SP2, .Net 2.0, 1.6gig cpu, 256 megs ram [I know this is really really low, but still most high-end games work fine]), each time it was launched it generated a "Out of Memory" Exception ("System.OutOfMemoryException: Out of memory.")
So to resolve the problem I did some "optimization" and was able to make a big difference - it crashes much later on in the Level Generation phase (where I create all my cells, objects, characters, etc... - this is the chunk that counts)...
Obviously this wasn't good enough but I spent an entire night looking through my code and was unable to find really anything I thought would make a huge difference (mind you - I am far from an expert on the subject)...
So the next step is to find out WHERE in my GenerateLevel() function all the memory is being eaten up - so I was wondering if there was a nice & easy way to get the Memory Usage of my program at different point in the GenerateLevel() function (that I would trace out to a text file) - this should enable me to "see" where in the code the most amount of memory is eaten and hopefully allow my to try and minimize it as much as possible...
Unless someone has some other suggestions? Profiling tools? Better methods of solving my problem, etc...?
Any ideas, hints, and help would be greatly appreciated, thanks
So to resolve the problem I did some "optimization" and was able to make a big difference - it crashes much later on in the Level Generation phase (where I create all my cells, objects, characters, etc... - this is the chunk that counts)...
Obviously this wasn't good enough but I spent an entire night looking through my code and was unable to find really anything I thought would make a huge difference (mind you - I am far from an expert on the subject)...
So the next step is to find out WHERE in my GenerateLevel() function all the memory is being eaten up - so I was wondering if there was a nice & easy way to get the Memory Usage of my program at different point in the GenerateLevel() function (that I would trace out to a text file) - this should enable me to "see" where in the code the most amount of memory is eaten and hopefully allow my to try and minimize it as much as possible...
Unless someone has some other suggestions? Profiling tools? Better methods of solving my problem, etc...?
Any ideas, hints, and help would be greatly appreciated, thanks