Welcome to the Builder Academy

Question Memory Use - Normal or Evidence of Leaking?

More
18 Nov 2013 14:16 - 18 Nov 2013 14:33 #4506 by krell
When I first fire up tba on my 64bit machine I notice that it begins with about 34 MB of allocated memory and is actually resident in that 34 MB. In less than a day, even if I never log in, I notice that the memory usage for both climbs up to 37 MB. While I've never seen it exceed [strike]37[/strike]38 MB, I've never seen it go down either. Also, the mud is pretty stable. Unless I do something stupid with my scripting, wreck something in the codebase or hit a bug it doesn't crash; if I let the mud run for weeks, which I have, it doesn't crash.

I don't think this is evidence of a memory leak as it seems pretty stable, but I'm wondering if this is normal and why? DG Scripts and Spec Procs firing up as time progresses? Dynamic allocation of assigned memory by the codebase? Something else?
Last edit: 18 Nov 2013 14:33 by krell.

Please Log in or Create an account to join the conversation.

More
20 Nov 2013 20:36 #4516 by thomas
Basically, yes, this is expected behaviour. When the mud starts it allocates memory for a lot of internal structures (the world, primarily). As you log on and off, use it, build, etc., you'll allocate copies of some objects (and char arrays) and initialize new static variables in different functions throughout the code. Those static buffers will not disappear which is why you aren't experiencing any fall in memory usage. However, the other temporary buffers for for example OLC and similar use are freed after use and so aren't leaks.

Please Log in or Create an account to join the conversation.

More
21 Nov 2013 04:07 #4520 by krell
That makes sense to me. Thanks for answering my question.

Please Log in or Create an account to join the conversation.

Time to create page: 0.181 seconds