This is how we code (?)

I have stumbled upon an Android application written by one of my friend, it is now in progress to be put on Android Market. Tonight I spent a little time to do some QA for his code as well as code review. Well, this does not give any clue related my expertise, since I only have to read carefully his code, then do UI automation test as well. No biggie, in fact.

The only thing I have in mind when executing test cases, then see the logcat … was surprised, a lot, how he manages memory allocation on his application ..

D/dalvikvm(   60): GC_CONCURRENT freed 617K, 45% free 4256K/7623K, external 1022K/2222K, paused 10ms+21ms
D/dalvikvm(   60): GC_CONCURRENT freed 714K, 45% free 4236K/7623K, external 1022K/2222K, paused 13ms+12ms
D/dalvikvm(  895): GC_EXTERNAL_ALLOC freed 389K, 52% free 2802K/5831K, external 1908K/2234K, paused 57ms
D/dalvikvm(  895): GC_EXTERNAL_ALLOC freed 103K, 53% free 2787K/5831K, external 3497K/3541K, paused 52ms
D/dalvikvm(  895): GC_EXTERNAL_ALLOC freed 88K, 53% free 2788K/5831K, external 4494K/4953K, paused 49ms
D/dalvikvm(  895): GC_EXTERNAL_ALLOC freed 176K, 53% free 2789K/5831K, external 6398K/6783K, paused 54ms
D/dalvikvm(  895): GC_EXTERNAL_ALLOC freed 132K, 53% free 2791K/5831K, external 8254K/9160K, paused 47ms
I/ActivityManager(   60): Process com.android.deskclock (pid 186) has died.
D/dalvikvm(  895): GC_EXTERNAL_ALLOC freed 220K, 53% free 2793K/5831K, external 11054K/11240K, paused 52ms
I/ActivityManager(   60): Process com.android.email (pid 290) has died.
I/dalvikvm(  895): Jit: resizing JitTable from 512 to 1024
D/dalvikvm(  895): GC_EXTERNAL_ALLOC freed 132K, 53% free 2794K/5831K, external 12644K/13457K, paused 46ms

These only happen when running the application, a deeper sight … it is in XML parser class, when reading RSS source on the net.

Need more digging on the memory leaks in the codes, though. Anyway, I found this link very useful: Android apps memory management

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s