yashsingh1/xdaforums huggingface dataset:
[Nexus 5 General] opssemnik:
what you die-hard fanboys (not everyone here, but we all know them), it dosen´t matter how the system handles RAM or whatever, the problem is, /data "user" apps are making the system allocate memory and never release OR reuse it again, this is a leak, if you follow the logic, yes after the system has done this a few times, it will be eating your whole memory leaving any for the apps, making them (and their services) fully reload once you use them, making the device laggy.

NOT every manufacturer has fixed, some has sort of fixed, but it isn´t fully fixed in any rom from any manufacturer, the problem don´t lie just in one place code - wise, but rather in various parts of AOSP (just see the commits 5.0-> 5.1), however manufacturers AREN´T allowed to touch some of them(i.e the native HAL part) or else google wont certify their roms to be bundled / upated with play store / google suite of apps.

And for what they fixed, most comes not actually from the manufacturer itself, but from their partners (i.e qualcomm) who provide a set of closed source optmizations for android(optimized drivers,ART,libc + m,etc), so the fixes dont come as commits / code changes, but already compiled, and thats why google itself do not apply to AOSP.

PS: if you read the bug tracker google marked as fixed, why it hasn´t been released? my theory would be that the fix (or better, the fixes) touch core parts of android, requiring their partners to update their drivers(in the case of the nexus 5 for instance, that would be lg,qualcomm,broadcomm and some others)

TL;DR: the memory leak is there, it isnt just for the nexus 5, and yes, shame on google for a 6months not fixed mark.

ALSO remember, the AOSP team isnt at one place, like they all work at google usa, rather they are all over the world, so communication sometimes can be a problem, its not that easy to develop new things via internet, even more making separated teams do so

---------- Post added at 03:32 AM ---------- Previous post was at 03:27 AM ----------

650mb of system is already caused by some sort of memory leaks, the system part DONT include system apps and their services, it just inlcudes system native processes (render thread, surfaceflinger, app_process and such), and 650mb for them IS too much, its more than windows 7 at its core consumes for instance, or better its more than double of what Kitkat and full linux distros consumes
[Nexus 5 General] markdapimp:
Solution: iOS, Just kidding I will love Android forever!

But right now, I will use iOS till Google has fixed leaks :good:

Also I would like to remind you about the 4.4.X Deal with the mm-qcamera-daemon battery drain/bug

This could be the same deal with Lollipop, Google may just jump straight to Whatever release is next.

If you don't recall mm-qcamera-daemon was an issue that plagued 4.4.X, Google didn't bother to fix it for Nexus devices and just gave them Lollipop. (Same for Google for not fixing it with all the .X increment updates) - The same for Lollipop with the memory leak since The Dev Preview to 5.1, Leaks still exist.

Who knows "Future Release" Could mean Android MilkShake :P
[Nexus 5 General] opssemnik:
the mm camera daemon was mostly a qualcomm fix (related to their blobs) and it wasn´t a memory leak itself. But i get what you meant and yeah, i also think(as i said) that either the fix, or the problem lies somewhere where OEMs would need to update device blobs for it to work(what i mean its that part of the problem could rely on one of the HALs for instance, requiring OEMs to update their drivers). Even more with the whole "fixed for future release" tag that this bug got (even tho "future" releases are already released after this tag has been put).

I would like to run KK, but i hate to see frame drops on animations, and i still wonder what took google the fix for them(async rendering for animations) more than what? 4-5 years(remember, iOS had this since it came out, hence animations being smooth even on the iphone 1)

BTW haha, i will stick to ubuntu touch(well, atleast on my n4 with its official support), and on the n5 will throw aosp KK on it and only the apps i need to work and let it like that for a bit. :P
[Nexus 5 General] AvgPhoneUser:
Well... Idk. I have cm12.1 from today and everything works fine. Try reflashing stock images
[Nexus 5 General] markdapimp:
Did you replicate this test?

https://www.youtube.com/watch?v=Iu8r9EQ7N-g

---------- Post added at 09:44 AM ---------- Previous post was at 09:37 AM ----------

http://androidandme.com/wp-content/uploads/2015/04/nexus10android511.png

13.9MB, I don't think Google fixed the memory leak with 13.9MB...

Disappointed, Apple/iOS looking better everyday.

All these tech sites, Android Authority etc, all state 5.1.1 will fix the memory leak.. Apparently not..

Has Google not learned to dog food their own employees?
[Nexus 5 General] darthanubis:
Please hurry to apple. Your whining is unbearable.
[Nexus 5 General] TobiS87:
So you are assuming that the leak hasn't been fixed because of the update's file size? These two things are not even a bit related to each other...! What if the memory leak can be fixed with one line of code? Just wait for the update before you complain over here... Its pathetic.
[Nexus 5 General] markdapimp:
The images are based off AOSP, I've been watching AOSP like a hawk.. There are no commits I can see that claim to have fixed the leak
[Nexus 5 General] Isus <3:
Is this issue only present in Nexus 5? I didnt notice any other android users except nexus 5 users complaining about this.

And if android is open source, why arent good devs already looking into code and trying to find issue?

I had this issue last time few weeks ago, would have more but I restart my device every 24 hours.. I also noticed that after 5 hours of phone being on it starts to be slower and slower even though my System is taking 500-700 mb ram which is I think, normal .. :/
[Nexus 5 General] DummyPLUG:
Should be on any 5.x device, most are N5 user just because for 5.x device a large number of user are N5/N6, and given that N6 have 3GB ram so it is not as easy as the N5 to affect by the memory leak.
[Nexus 5 General] Isus <3:
I'm going to report this issue to google with heavy details, logcast, information and stuff. I didnt see any good report which can help solve this issue...

---------- Post added at 09:02 PM ---------- Previous post was at 08:05 PM ----------

I reported this issue to google:

https://code.google.com/p/android/issues/detail?id=171150&thanks=171150&ts=1430506443

Please star it so google gets attention and please do not post any useless stuff like "i also have this issue pls fix!" and similiar stuff. If you want to post, post your logcat and useful information about this issue. Also OP , please put link in original post

Edit: If you're wondering why did i report this because it was reproted like 10 times already:

Indeed it was, but it was useless posts with no good issue information and users complaining without providing any useful information. This posts will be global on xda and android community as I will post this in high-end smartphone forums (phones which will receive android lollipop or already did) and other advanced android forum.

---------- Post added at 09:22 PM ---------- Previous post was at 09:02 PM ----------

http://xdaforums.com/google-nexus-5/general/android-5-memory-leak-official-thread-t3097950
[Nexus 5 General] petenatas:
Nexus 7 2013 with stock 5.1.1 image doesn't have any of these issues ...
[Nexus 5 General] Isus <3:
Maybe when google releases 5.1.1 factory image for our phone, will fix this issue
[Nexus 5 General] Aerowinder:
And I suppose the next play services update will fix the battery drain bugs?
[Nexus 5 General] ichundu:
We are not alone [emoji14]

http://www.forbes.com/sites/gordonkelly/2015/05/01/samsung-galaxy-s6-memory-problem/
[Nexus 5 General] jnsson:
On my Nexus 4 with 5.1 I have around 4 days uptime and I don't have any memory leak, and I didn't have any problems on 5.0.x

On my Nexus 5 I have had 1 issue, but not more on 5.1. On 5.0.x I had problems
[Nexus 5 General] KingUsman:
That's RAM management problems not a memory leak, we only have a memory leak issue

Sent from my Nexus 5
[Nexus 5 General] markdapimp:
It's the same issue, Forbes/Samsung just re-worded it for the general public mass.

Notice at the end of the article it's got a heading of "All Google’s Fault?"

And it states, "While fingers are being waved at Samsung, the root of the problem is likely to be Google. The company admitted to a severe memory leak problem in Android 5.0 Lollipop which it has so far failed to stamp out in 5.0.1, 5.0.2 and 5.1."
[Nexus 5 General] pfmiller:
Glad to see it. The more attention this problem gets the better.
[Nexus 5 General] fix-this!:
yeah it is concerning how this memory leak bug plagues all lollipop roms and devices. lollipop IMO is the buggiest android release yet.
[Nexus 5 General] RusherDude:
You don't seem to understand one thing: The RAM that should grow till full and then free when another app needs it is the USER one, not SYSTEM one. He is reporting that the SYSTEM ram (aka the ram that doesn't belong to any USER app) is growing everytime he opens a USER GAME.

That is a leak like a house.
[Nexus 5 General] antichoice:
I have install RASTAPOP ROM

http://xdaforums.com/google-nexus-5/orig-development/rom-rastakat-vanilla-t2541185

and there is no memory leak when open and closing Farm Heroes Saga
[Nexus 5 General] antichoice:
After 30 times open and closing Farm Heroes Saga on RASTAPOP ROM
[Nexus 5 General] Isus <3:
Guys I installed latest CM 12.1 Nightly (updated from 04-25) and memory leak is gone when opening farm heroes saga..
[Nexus 5 General] markdapimp:
http://review.cyanogenmod.org/#/c/96617/

New commit related to Memory leak
[Nexus 5 General] jlmcr87:
It´s posible to make a flashable zip to fix the google stock rom?
[Nexus 5 General] antichoice:
On CM build 20150504 memory leak is present in my device (30 times opening and closing Farm Heroes Saga)
[Nexus 5 General] capt_f0r3st:
More information about this?? So, the leak is fixed in latest CM build?
[Nexus 5 General] Isus <3:
Looks like it is. I had memory leak issue every day from running farm heroes saga and also sometimes memory would go crazy after 48 hours of uptime now, over 60 hours uptime, system memory is at 550-550 mb and farm heroes saga wont cause memory leaks..
[Nexus 5 General] jlmcr87:
Good news. The question now is when google will patch this.
[Nexus 5 General] Evo_Shift:
Probably soon if CM found a fix. Google didn't seem to know how.
[Nexus 5 General] wintrxtrem:
So what's the max amount of ram the system should realistically be using?

My current up time is about 3.5 hours running CM 12.1 5/5 nightly.
[Nexus 5 General] rolldroids:
About 300 mb
[Nexus 5 General] wintrxtrem:
So not really fixed I guess : (
[Nexus 5 General] snc74:
There's no memory leaks on mine. I'm on latest Euphoria rom with despair kernel.

Snc74
[Nexus 5 General] mdmogren:
I think 300 seems pretty damn low, I'd be happy if it never crossed over 800mb honestly, that would solve the problem.
[Nexus 5 General] californicated:
Isn't Despair Kernel N6 only?
[Nexus 5 General] markdapimp:
Have you tested with other apps known to cause the leak also?
[Nexus 5 General] constantinos360:
I found hangouts to cause some kind of memory leak. If you open it then the system memory goes up by 200-300 mb. If you close it, then open and close it again it goes back to normal.
[Nexus 5 General] jingw222:
Why is it that your top 3 RAM stats add up to more than 3GB? What the deal with it?:eek:
[Nexus 5 General] nashy10:
Installed latest nightly, still getting memory leak with farm hero's , using non CAF version.. Stupid question, tried to install CAF nightly, zip failed, redownloaded, still failed. Why?
[Nexus 5 General] capt_f0r3st:
How is it possible someone is getting memory leak with farm heroes on the latest cm and someone is not??
[Nexus 5 General] nashy10:
Really not sure... Confused about this myself. Just flashed rastapop, and confirming no memory leak now. Still, latest nightly could eat up almost all the ram when repeating the farm hero's test
[Nexus 5 General] pfmiller:
That's not a memory leak if the memory eventually goes down again. The whole point of a memory leak is that the memory is lost for good and never goes back down.
[Nexus 5 General] republicano:
its at 570mb after 48hours for me

i would expect system to be at 400mb,

i just checked my moto g 1gb ram, its at 370mb
[Nexus 5 General] shr33kant:
Doesn't the moto g have a lower screen res thus resulting in smaller textures in the ram?
[Nexus 5 General] republicano:
yes its at 720p, i couldnt get alot of information about how much ram would be required 720p vs 1080p vs 1440p, framebuffer,textures etc. so much of the ram would be used by the gpu.

i get 350-400mb system ram used on boot, running without alot of services

but from the screen shots ive found on nexus 6, system ram is 185 - 400mb so its managing better than n5

http://xdaforums.com/showpost.php?p=59016511&postcount=4305
[Nexus 5 General] wintrxtrem:
Install CAF TWRP in first or second post of CAF thread. Be sure not to ask that same question in that thread, either!
[Nexus 5 General] vaindil:
None of you seem to understand what a memory leak actually is. It's when some piece of code has a bug that causes it to request memory from the system but never free that memory back to the system. I only glanced at the last few pages, but if you play Farm Heroes or whatever the game is then of course your memory usage will increase. The game needs to use memory to run. This is not a memory leak. The two fixes for the ColorFade leak show this--see the lines added that call the release() function? That's returning memory back to the system, thereby fixing the leak.

It's completely normal for your Nexus 5 system to be using anywhere from 300-800 MB of RAM. The higher end isn't ideal, but it's not bad. It's not bad if something uses RAM, that's what it's there for! The problem arises when too little RAM is left for new processes to call the amount of memory they need. The only thing you should be worrying about is if your free RAM falls below ~350 MB or so. (I'm not an Android developer, so I don't know specifics for Android, but I believe that's in the ballpark.) That's when screen rewrites start to happen and you have apps crashing--they just can't get enough RAM to run properly.

So, if you're going to talk about a memory leak, please at least know the definition of the problem you're talking about rather than just adding "ZOMG MY RAM USAGE IS SO HIGH". That doesn't help anyone improve anything.
[Nexus 5 General] markdapimp:
Here's how the leak is about to go down, compared with other bugs that "Took awhile to get squashed" and took many attempts.

4.4 - mm-qcamera-daemon Bug

4.4.2 - mm-qcamera-daemon Bug

4.4.3 - mm-qcamera-daemon Bug

4.4.4 - mm-qcamera-daemon Bug (Fixed, NOPE!)

5.0 - mm-qcamera-daemon Bug (Fixed Finally, Introduced Memory leak + Other camera issues)

5.0.1 - Memory leak still here + ColorFade memory leak discovered

5.1.0 - Color Fade memory leak fixed, Other memory leak still exists

5.1.1 - Memory leak STILL NOT FIXED? (Hopefully it will)

Android 6.0.X? - Hey, We've fixed the leak at the next Android release....

This is getting stupid, how is this still not fixed after Lollipop has aged about 6 months already, Why isn't Google testing their own stupid software with their own employees instead of carelessly rolling it out to AOSP where all these OEM's such as Sony, Samsung, LG, HTC push the same buggy release to their phones, and for some phones the release may be the final android version it may see. Google essentially left a couple of good handsets with a buggy leaky version of android yet. - Bravo Google, just bravo!

How the hell is not this top priority? if this were Apple it would've been fixed internally before being pushed out to the regular user and if somehow it got pushed out, Apple would've fixed it within that 1-2 week period NOT 6 MONTHS.

It'll be interesting once Samsung and Tizen become close to Android, Samsung can even see it in their own eyes, Android sucks with releases and time frames for bugs in software.

Before Android L gets the necessary fixes it needs, Google will shove our mouths with Android M

I love Google to the bone with all their services, Youtube, Gmail even Android!

But Google must find a way to have a public beta like what Apple is doing, Instead of just using the Nexus users as lab rats and pushing out "Nightlies" to the general public. (A Very harmful way of testing Android, it hurts the OEM's too!)

#doneranting
[Nexus 5 General] vaindil:
Google does actually test builds internally. It's called dogfooding, and it happens before each major release. There are some bugs that simply can't be discovered even with all of the internal testing they do, which is why EVERY SINGLE OPERATING SYSTEM EVER RELEASED has issues like this.

Oh really? Let's examine this claim. Apple took over three years to fix a common iMessage bug. A bug was reported on September 21, 2014 with the release of iOS 8 that affected Bluetooth, wifi, battery, and calendar syncing. How long did it take them to fix that one? 170 days. Oh, wait, they haven't actually fixed it yet, 229 days later. No, I'm not really a fan of Apple as a company, but it takes a long time for ANY company to come out with fixes for problems like these. Do you have any idea just how complex these operating systems are? Fixing one problem isn't as simple as "just add a couple of lines here and there", lots of testing has to happen to make sure that a fix doesn't introduce any new problems. I just ran a count against the Lollipop platform framework base, and there are over 3.5 MILLION lines of code. This is WAY fewer than the entire source of the Nexus 5 factory image (even if you exclude the official Google apps), but it's what I grabbed since I don't want to spend more time on this post than I already have.

G:\Desktop>cloc-1.62.exe --ignore-whitespace platform_frameworks_base-lollipop-release
16910 text files.
15802 unique files.
6856 files ignored.

http://cloc.sourceforge.net v 1.62 T=112.79 s (121.4 files/s, 44595.7 lines/s)
--------------------------------------------------------------------------------
Language files blank comment code
--------------------------------------------------------------------------------
Java 5186 351124 474278 1507230
HTML 4510 486007 74482 1486502
XML 3228 17988 53165 328396
C++ 399 26173 17618 151869
C/C++ Header 268 6294 9582 19217
Javascript 9 74 123 4018
C# 16 221 12 3346
Rust 29 773 528 2960
Python 10 535 358 2385
C 11 247 227 967
CSS 3 182 56 811
Bourne Shell 14 121 156 493
yacc 1 28 2 343
YAML 2 137 28 259
lex 1 37 3 174
Bourne Again Shell 6 26 21 152
DOS Batch 1 24 2 64
sed 1 1 5 19
IDL 1 2 0 15
--------------------------------------------------------------------------------
SUM: 13696 889994 630646 3509220
--------------------------------------------------------------------------------
[Nexus 5 General] markdapimp:
The colorfade leak was only a couple lines of code?

Not to be rude but, most iOS users are happy and aren't raging, the OS is mostly stable.

While Android L hmmm, Not much.

This is my last Nexus device from here on going to buy OEM as they apply their own fixes too.

Oh, and lets not forget about the whole "Android System WebView" update which broke many apps for days and days while Google updated the WebView 2-3 times still failing to fix it.

( http://www.droid-life.com/2015/04/27/apps-crashing-android-system-webview/ )

Even today some devices still have issues - Let me guess.. "Dog Fooding" the population who are on 5.*.* or the average joe?
[Nexus 5 General] vaindil:
Yes, that is completely true. How long do you think it took to figure out that fix though? The fix wasn't even provided by Google either; it was a user. Just because some fixes do happen to involve only a few lines of code doesn't mean it didn't take any time to a) find the cause, b) figure out how to fix it, c) implement and test the fix to verify nothing else is broken, and d) push the fix out. My point is still valid--bugs aren't always quick things that can be thrown together.

[citation needed]

I deal with facts, not vague statements about what "most users'" opinions are.

Oh, you mean the bug that was fixed 4 days after it surfaced? Quite the argument.
[Nexus 5 General] markdapimp:
4 Days, still a very long time. However some users are still expericing this issue. Just take a look at the reviews.

Either these users are having issues or Google did a staged roll out on the update

c) implement and test the fix to verify nothing else is broken

So they didn't find the obvious memory leak currently plaguing 5.1

https://code.google.com/p/android/i...ak&colspec=ID Type Status Owner Summary Stars

https://code.google.com/p/android/i...ak&colspec=ID Type Status Owner Summary Stars

https://code.google.com/p/android/issues/detail?id=159738

"This has been fixed internally. We do not currently have a timeline for public release." - More like We're still finding where it's leaking and waiting for a AOSP contributor or OEM to fix it for us.

http://www.gottabemobile.com/2015/04/17/iphone-6-plus-solace-element-case-review/

While buggy for a certain group of users 8.4 is coming soon. I Myself am running my iPhone 5s and iPad air as a daily driver and have yet to noticed these "WiFi" issues.

I and many users will continue to whine until this dreadful memory leak fix is fixed, hopefully Google get's it right with 6.0 and finds a solution to Android fragmentation.

Yes, I agree there are bugs on all platforms and you simply just can't avoid it. However it is the way these "Companies" respond to these bugs.

Sure, "iMessage bug" however there are workarounds such as turning off iMessage and sending as SMS. While the leak with Android L "Rebooting once a day or every 6 hours for some heavy users" Simply is a burden.
[Nexus 5 General] jlmcr87:
"request memory from the system but never free that memory back to the system" This is exactly what happens, so yes it´s a memory leak.
[Nexus 5 General] vaindil:
Can you provide evidence of this? If Farm Heroes is causing this to happen, then it's more likely a bug with the app than with Android. (No, I'm not saying there isn't a memory leak in Android 5.1.0, as it's documented and confirmed, but what you're saying doesn't appear to be attributable to that bug.)
[Nexus 5 General] pfmiller:
How could a bug in the app result in the memory leak people are experiencing? An OS is supposed to release any memory allocated to the application when the application exits, regardless of if the app releases the memory properly or not.
[Nexus 5 General] markdapimp:
https://www.youtube.com/watch?v=Iu8r9EQ7N-g

As you can see above, some OEMS have fixed this in their software before Google even did for AOSP/Nexus devices.

There is no hiding this one, use any heavy game with hardware acceleration

Just to name a few:

Farm Heroes Saga

Candy Crush Saga

Monument Valley

and many more

System will allocate the ram to the app but won't release it

"then it's more likely a bug with the app than with Android."

Then why did google "Accept" that there is indeed a leak?

No matter how bad the app is poorly made/designed the OS should be still able to release the memory it's allocated AFTER it's long gone.

Just like Windows (NO not the mobile OS) If a program was behaving poorly you hit that X and it's gone or you pop up task manager and kill the process... That's it! it's gone

While on Android L Swiping all your recents, using a task killer or fast reboot and all these "Booster" apps will yield no results at all... The allocated system memory will never be free'd.

Your only solution is to reboot.

The nexus lineup of devices was to demonstrate to OEM's or consumers/developers how stock android is supposed to run, apparently not as currently it's a leaky mess.
[Nexus 5 General] Jakeuten:
you've got to love having half of your ram usage be system.