Google I/O 2011: Memory management for Android Apps
HTML-код
- Опубликовано: 12 сен 2024
- Patrick Dubroy
Android apps have more memory available to them than ever before, but are you sure you're using it wisely? This talk will cover the memory management changes in Gingerbread and Honeycomb (concurrent GC, heap-allocated bitmaps, "largeHeap" option) and explore tools and techniques for profiling the memory usage of Android apps.
There is something about the way he speaks that makes me want to listen and not fall off to sleep, unlike how I feel with some of the other speakers.
After 10 years of coding learned a new concept @26:10 from a 10 year old video!
Good presentation! He looks exhausted... Hunting memory leaks is tough job
Just fixed a huge memory leak thanks to this talk!!! Thank you so much Pat!!
This talk has gotten me out of a lot of jams. Great talk, really useful.
I keep coming back to this video; it's pretty much a defining presentation on the subject.
Re: 5:20: while getMemoryClass() generally returns available heap for stock versions of Android, CyanogenMod in particular allows the user to adjust this limit, and changing it does not result in getMemoryClass() returning a different value. Runtime.getRuntime().maxMemory(), however, does.
Very, very clear talk. Just excellent.
Great presentation! Helped me a lot understanding this topic.
It is fairly simple assuming you know a small bit about either command line and/or environment variables.
In the Android SDK that you download, there is a program called hprof-conv.exe, either directly go to this directory through command prompt, and execute the command which he shows in the video, or add the directory path of the file to your system Environment variables so it can be executed anywhere within command prompt directories.
Thank you so much! With your help I hunted down the little bugger I had ^^
Very clear and informative!
Thank you very much!
Awesome talk Pat!
Great talk and pretty helpful. Doesn't the voice of the guy who asked the questions around 51mins in really remind anyone else of Agent Smith from The Matrix?
It's all about context.
Listen to the lines before that one as well. The message is: you shouldn't explicitly start the garbage collector.
Great Talk! Found my leak in 20 mins (though I didn't call it "Leaky" :-)
I still don't understand how to manage memory leaks :(
I should see this before, god, I like this video!
Does this guy by default has 0.95x speed? :P
BTW this talk is too much helpful and needs appreciation (Y)
It's Juan Mata!
Awesome Video ;)
hats off to u........
great talk
Watch "aut" , this stuff is addictive! THUMBS UP
I need to convert it although I use the DDMS plugin. Maybe this will help some people who also get errors.
Why doesn't he exclude phantom and soft references also at 32:23. Would't this be smart when working on an App?
nice talk patrick and thank u very much
I'm looking at the code of a former developer who has left the company and he commonly practices the use of two system.gc(), back to back. What's up with that?
I am a beginner and I don't properly understand how to manage memory. This video was very helpful but I want to study it properly from the start. Can anyone please share some good links or resources?
Well my adb logcat output doesn't show that much info. It just states how many objects/bytes it released. Not the current and max size of the heap. It looks like this:
06-23 13:05:19.072: DEBUG/dalvikvm(977): GC_FOR_MALLOC freed 3312 objects / 401064 bytes in 351ms
Nice, thanks
It's refreshed after using a movie or camera and going to another app, is there any solution?
Should I watch it in 2021?
非常好的视频,太有用了
Excellent presentation, can we download the slides somewhere?
Θα το δω μέσα στην εβδομάδα. Αφου λες ότι αξίζει.
are the slides of this video available anywhere?
Awesome
awesome
"with 256mb you're going to see longer garbage collection pause times"
thats why we have C/C++
The guy says the hprof conversion process is "easy" yet doesnt give a thorough explanation as to how to it, Ive been trying to convert it for over a day with no luck
When I run my app I get this "E/JavaBinder﹕ !!! FAILED BINDER TRANSACTION !!!" but my app doesn't crashes, I have days analyzing the my app with Eclipse MAT, looking for holding references and bundle extras but I can't find what is the cause of the error, thee heap starts at 14253K and airses to 20000k but then stop there and the error appears, could someone help me with this please? more detailed information of the problem is here stackoverflow.com/questions/25513188/android-java-binder-failed-binder-transaction
Usually it happens with you passed heavy Objects like Bitmaps in Parcelable and Bundle, Parcelable become very exhausted that time.
Thanks for the answer, I don't know why but the problem was caused by a facebook profile image that I had in a settings fragment, I removed this image and the problem disappeared, the weird thing is that I just got the image with a Request.newMeRequest function and just showed it, I never passed it.
The reason you get that error because maybe the Image was to heavy and your memory is getting low. Their are several techniques you can use to lessen the Memory used by that picture.
"So at the very top of the list we have the resources class [...] That's fine."
No it isn't damn it! That is the reason for which I am here grrrr
cool
It's funny to see Google using Apple's (a director competitor's) products. Get on that Ubuntu goodness!
At 0:29 I realized his nationality.
So funny to look at this now
Lol you wanna try some memory management on lollipop its a disgrace
timecloxxxxxxxx larger organisms the finite fictory partitions frak yeah
I hear a ***** here! 43:38
Wow, good ear. That is indeed me.