HomeНаука и техникаRelated VideosMore From: Oracle Learning Library

From Java Code to Java Heap: Understanding the Memory Usage of Your Application

1006 ratings | 133749 views
When you write and run Java code, the JVM makes several allocations on your behalf, but do you have an understanding of how much that is? This session provides insight into the memory usage of Java code, covering the memory overhead of putting "int" into an integer object and the cost of object delegation and the memory efficiency of the different collection types. It also gives you an understanding of the off-Java (native) heap memory usage of some types of Java objects, such as threads and sockets. Most importantly, the session covers how to determine where there are inefficiencies in your application and how to choose the right collections to improve your Java code. Copyright © 2013 Oracle and/or its affiliates. Oracle® is a registered trademark of Oracle and/or its affiliates. All rights reserved. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the "Materials"). The Materials are provided "as is" without any warranty of any kind, either express or implied, including without limitation warranties of merchantability, fitness for a particular purpose, and non-infringement.
Html code for embedding videos on your blog
Text Comments (30)
Ganesh Sonar (9 months ago)
learned the actual things going on background..Thanks a lot....
Rui Xue (9 months ago)
3:12 Java Memory Management
Jakub Dubański (10 months ago)
Really good presentation. Can I embed it on my blog? For now, it is just linked, but I would like to have it embedded there if You don't mind. @Oracle Learning Library
Lova Chittumuri (1 year ago)
Please give the example.
Rahul Limkar (2 years ago)
Very nice explaination. Thanks
Rudolf Eremyan (2 years ago)
Briliant lecture!
Sanjay Bharatiya (3 years ago)
Wonderful presentation. Very informative and presented in a magnificent way. Thanks a lot for sharing this.
Abhinav Kumar (3 years ago)
What is permgen memory than?
mchandu8 (3 years ago)
I was delighted to light on this informative presentation
nikalldway (3 years ago)
It was very helpful thanks a lot!
Vipul Pathak (4 years ago)
Too cool. Very interesting details about the memory model of Java applications.
Dharmendra Prasad (1 year ago)
Not sure where is the Memory Model discussed in this video.. I only see memory layout, that too very less details.
Srikanth Pb (4 years ago)
He is definitely my master !  , I learnt a lot from this lovely articulate presentation . Looking forward to get quick insights on subtle areas of programming 
Praveen Mooli (4 years ago)
Very interesting presentation. Good insights on memory usage of different collections. Thanks.
Raghavendra Badiger (4 years ago)
Very Good!! Thanks..
Alex Martinson (4 years ago)
Could someone please help to clarify the over head figures for the Hashmap? It says 32 bytes per key value entry. Each Hashmap$Entry contains four items that are KeyHash and three other items of type object. So if each of these are 8 bytes then what he says about the entry overhead being 32 bytes is correct. But further down the slide he says overhead of Hashmap is 48 plus 36. But each entry has an overhead of 32 bytes. In essence it sould be 48 plus 32. So where do the additional 4 bytes come from when the slide says 48 plus 36? So I am slightly confused and appreciate it if anyone could shed some light on this issue. Many thanks
Azhad Ahmad (4 years ago)
brilliant! thanks!
kranthi paidi (4 years ago)
Wonderful session, thanks a lot!
Sebastian Peters (4 years ago)
Learned some new details today. Great examples.
Alexander Graschuk (5 years ago)
Excellent! Thanks!
manju gh (5 years ago)
Really good 
Dan Jones (5 years ago)
Love it man, five stars
tomek (5 years ago)
very good presentation
foulsoft (5 years ago)
Wow !!! Thank you. Amazing interesting :)
Nayeem Hussain (5 years ago)
wow
Michael Wang (5 years ago)
Good to know these numbers.
Selvakumar Subramanian (5 years ago)
Very nice
Simer Plaha (5 years ago)
Great
mlado5 (5 years ago)
Excellent!
Fouad Almalki (5 years ago)
This is very informative presentation. Thanks!

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.