So I think I've finally plugged all my memory leaks (tip: watch out for 
Handlers which outlive your Activity), and overall, my apps seem to be doing 
pretty well in this regard. But in the last couple of days I've had a user 
complaining that one app is using far too much memory, and furthermore that 
it gets worse as the app is running longer (it has a clock widgets, so it'll 
stay resident in memory if things aren't too tight). He's saying 
it's frequently at 40-50MB, and will climb over 80MB. 

Now, you and I both know that this isn't possible given the constraints of 
the Dalvik heap. Following up with this user, I learn that he's getting 
these numbers from Process Monitor Widget (PMW), and sure enough, when I 
install it I see something similar. I reached out to the dev of PMW, and he 
informs me that he's getting the figures "from the kernel process 
description file located @ /proc/$pid/stat." Not being a Linux kernel guy, 
I'm not well versed on such matters, but I'm strongly suspecting that it's 
not valid for Dalvik processes.

For example: right now the app in question on my N1 is showing 57MB in PMW, 
while a heap dump in DDMS shows 3.4MB. This latter number seems quite 
reasonable to me, but I don't feel OK in just going back to this user and 
saying "PWM, and other apps of its ilk, are just wrong." That could easily 
develop into a "he said, she said" situation.

So, I'm hoping somebody here - ideally someone on the framework team (you 
here, Romain? ;^) ) - can speak more authoritatively about this. And 
hopefully, other devs that face this situation in the future can be better 
equipped to deal with it. Anyone?

String

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to