-1

OutOfMemory exception occurred frequently in an Android app with more than ten activities. I want to calculate the memory usage for each activity, is there any way?

1

1 Answer 1

-1

Use DDMS (DDMS perspective in Eclipse or Device Monitor from Android Studio I think. Select the process on the left and click the "Update Heap" button. Find the memory information on the right. Your process needs to be set to be debuggable for this.

But I don't think this can distinguish between Activities though.

If you need more detailed information you can make DDMS dump an hprof file with your complete heap contents for further analysis. Use these instructions to convert the file format,

hprof-conv <infile> <outfile> 

and then use the Eclipse Memory Analyzer to open and inspect it.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.