So far, my lost memory is at 100mb, but it does not rise anymore since quite some time.
Maybe I'm a little bit too full of expectation, but I still do not understand how it can be so hard to debug this issue. How is it possible, that this memory usage is NOT seen by procrank / ps / dumpsys meminfo / top / etc...
All these tools show the current usage of all processes running on my phone. So there is a much deeper problem, than just this issue.
Yes this issue seems resolved but from another viewpoint the much bigger problem, namely that we could not even pin point the process which caused the problem, is in my oppinion neither solved nor was it tackeled in any way.
The relevant commits (cc12abf69bf608b1accffb15682bdeecd36aaaa3 to 6a8acccc9a65df6cd8782d8858003dea75cfa6e8, found
here) are part of the msm graphics code, so maybe it's graphics memory that gets reserved by the system and as such is not bound to a process?!
Maybe someone can explain how this graphics concept works, what mdss is and what it has to do with an
iommu?
So reverting all those ~30 commits seems to "resolve" the basic issue of leaking memory. We still have to understand how they lead to the leak and by which line(s) it is caused to fix it finally.
Another helpful comment by GuzTech that I got via private message:
GuzTech said:
Hi ph4zrd,
I'm sending you a private message since I just registered on XDA and cannot comment in the "CM11 debug thread for Falcon" thread yet, because I do not yet have at least 10 posts
I also have the XT1032 and everytime I cycle through power on/sleep by repeatedly pushing the power button, my RAM usage starts to increase. Using dumpsys meminfo, I found that every single time I do this, my memory usage is increased by a little more than 1280 * 720 * 4 = 3686400 bytes. This lead me to believe that somewere there is a leaf of the size of the framebuffer + a little overhead.
The increase is always at least this amount and usually a little bit more, and it is consistent with the sleep/wake up cycle. I'm very new to Android development and right now I'm trying to look for places where such a memory leak could appear. Hopefully this information helps.
Cheers
It sounds plausible to me that the graphics code stores copies of the framebuffer somewhere and doesn't free the memory afterwards. But I still don't understand the concept of the msm graphics stack, so these are only speculations.
@dhacker29 or
@Entropy512, maybe one of you can provide some clarity or help fixing this.