Memory leak
#1
My system works some days and I see memory leak. How can I help to debug it is?
   
Reply
Thanks given by:
#2
I'm not sure if it's a hard memory leak. I tried running Cuberite with valgrind for some time and after stopping, all the memory was properly freed.

It could still be a soft leak - the server knows about all the memory it allocated, but keeps allocating more and more.

I have no idea if there are any tools for Linux / BSD that could do live memory analysis. We're using a StackWalker for Windows builds that can keep track of each memory block's stacktrace at the time of allocation, so we could do some statistics on that (the dumpmem console command). This slows down everything so much that it's disabled by default and you'd need to set some preprocessor defines in order to enable it.
Reply
Thanks given by:
#3
Valgrind is the tool on linux. Massif should be able to dump that info http://valgrind.org/docs/manual/ms-manual.html
Reply
Thanks given by:
#4
I'm still not able to use Massif effectively. @worktycho would you know how to list the difference between two memory snapshots? I'd like to compare the allocated blocks between two snapshots of the same process, taken a few minutes apart.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)