PDA

View Full Version : What's a memory leak




3bs
Sep 15, 2012, 06:49 PM
I keep hearing about it and people are saying that all the current Galaxy S3 JB ROMs have them until Samsung releases some code regarding drivers or kernels or something. And I read that the only temporary fix is a reboot when the phone starts feeling sluggish which I think I'm starting to notice since I flashed the Paranoid Android ROM.

I'm not sure if this is just on the AOSP JB ROMs or the Samsung based ROMs too.

I'd ask on xda but they're not as friendly as you guys here :p



kdarling
Sep 15, 2012, 09:19 PM
A memory leak is a situation where memory is used but not given back when it's no longer needed. The nickname comes from the visual of a bucket of water (available memory) with a tiny hole in the bottom.

It can happen when an app (or the OS) allocates some memory for a temporary task and then never gives it back when it should. Another way is if the app keeps asking for more than it should.

Example: an email app. Let's say it allocates a memory buffer to read attached pictures into and is supposed to give that memory buffer back when it's done. But a dumb coding mistake allows it to skip around the giving-back part if the user never looked at the picture. That code bug creates a memory leak, and it gets bigger every time a photo comes in.

Over time, the system runs out of available free memory, because it's all mistakenly used up (leaked away). The easiest fix is to reboot, which resets memory usage (fills the bucket back to the top).

As for the S3 ROMs, I do not know enough about them to say. Apparently some claim to have fixes.

3bs
Sep 15, 2012, 09:31 PM
A memory leak is a situation where memory is used but not given back when it's no longer needed. The nickname comes from the visual of a bucket of water (available memory) with a tiny hole in the bottom.

It can happen when an app (or the OS) allocates some memory for a temporary task and then never gives it back when it should. Another way is if the app keeps asking for more than it should.

Example: an email app. Let's say it allocates a memory buffer to read attached pictures into and is supposed to give that memory buffer back when it's done. But a dumb coding mistake allows it to skip around the giving-back part if the user never looked at the picture. That code bug creates a memory leak, and it gets bigger every time a photo comes in.

Over time, the system runs out of available free memory, because it's all mistakenly used up (leaked away). The easiest fix is to reboot, which resets memory usage (fills the bucket back to the top).

As for the S3 ROMs, I do not know enough about them to say. Apparently some claim to have fixes.

I thought it was something like that. Thanks for clarifying.

Do you have an S3 yourself? I've read on the CM10 (JB ROM) xda thread that the developers that are coding it say that there's no fix and we'll have to wait. I'd love to know if it's possible and how to fix it. I went back to CM9 (ICS ROM) because it's running smoother.

Orange Furball
Sep 15, 2012, 11:58 PM
I thought it was something like that. Thanks for clarifying.

Do you have an S3 yourself? I've read on the CM10 (JB ROM) xda thread that the developers that are coding it say that there's no fix and we'll have to wait. I'd love to know if it's possible and how to fix it. I went back to CM9 (ICS ROM) because it's running smoother.

I'm on a Note CM10 and we have memory leaks too. There is no cure until Samsung releases the source (once they officially leak JB) and then the developers will code CM10 with no memory leaks. Its all a waiting game

3bs
Sep 16, 2012, 10:13 AM
I'm on a Note CM10 and we have memory leaks too. There is no cure until Samsung releases the source (once they officially leak JB) and then the developers will code CM10 with no memory leaks. Its all a waiting game

I haven't tried CM10 yet but I think I'm gonna flash it now. As much as I liked the JB features on Paranoid Android I just didn't want to be rebooting so often. How often do you feel you need to reboot?

matttye
Sep 16, 2012, 10:16 AM
I'm running the LI7 Samsung Jelly Bean ROM and haven't noticed any problems. I've only seen people talking about memory leaks on the AOSP ones on XDA.

Mrg02d
Sep 16, 2012, 01:11 PM
This is the first I have heard of this. Ive never seen my available memory go below 1gb, and thats on a memory hungry twiz rom.

matttye
Sep 16, 2012, 01:18 PM
This is the first I have heard of this. Ive never seen my available memory go below 1gb, and thats on a memory hungry twiz rom.

It's AOSP Jelly Bean ROMs suffering these leaks.

Mrg02d
Sep 16, 2012, 03:15 PM
It's AOSP Jelly Bean ROMs suffering these leaks.

Im using cm10, which is an aosp JB rom.

3bs
Sep 16, 2012, 05:14 PM
Im using cm10, which is an aosp JB rom.

I was using Paranoid ANDROID (latest build) yesterday and my free memory was never above 150mb but I have the international GS3.

matttye
Sep 16, 2012, 05:23 PM
Im using cm10, which is an aosp JB rom.

The post I quoted said you were using a touchwiz ROM :p

Check out the CM10 Nightlies (http://forum.xda-developers.com/showthread.php?p=28959047&highlight=memory+leak#post28959047) thread on XDA and do a search in that thread for "memory leak" - it appears they're still prevalent.