So, I'm blowing up the heap somewhere in my logic thread of the Android game I'm making, it plays fine until the heap randomly grows from ~3MB to almost 30MB, whereas the game hangs (quite understandably). I've been hacking away at this bug for a few days, turning systems on and off, and playing around with both DDMS and the Eclipse Memory Analyzer, and have found nothing, quite probably because of my lack of understanding on how to use these tools.
Anyone knows some good tutorials / examples for android memory debugging? Specifically of the heap.
Thanks guys.
This one seems based on that eclipse article but really focused on Android: http://ttlnews.blogspot.com/2010/01/attacking-memory-problems-on-android.html
This article describes pretty well how to create a heap dump and analyze it using Eclipse MAT. This will help you find the most likely suspects for memory leaks pretty quickly.
HERE: http://dev.eclipse.org/blogs/memoryanalyzer/2008/05/27/automated-heap-dump-analysis-finding-memory-leaks-with-one-click/
In DDMS you can use the allocation tracking tab to see where you're allocating memory in your code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With