JaimeBarrachina
JaimeBarrachina

Reputation: 428

Tutorials or examples for Android memory debugging

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.

Upvotes: 5

Views: 9670

Answers (4)

QQQuestions
QQQuestions

Reputation: 736

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

Upvotes: 6

Romain Guy
Romain Guy

Reputation: 98501

In DDMS you can use the allocation tracking tab to see where you're allocating memory in your code.

Upvotes: 3

Will Tate
Will Tate

Reputation: 33509

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/

Upvotes: 3

Reno
Reno

Reputation: 33792

Though not so much of a debugging answer this will definitely help.

The only tool that i am aware of is the ddms tool , the profiling feature may help you track down this issue

Upvotes: 1

Related Questions