Stack and Heap: Memory Management In Java (The most important Concept in Java)

Stack and Heap: Memory Management In Java (The most important Concept in Java)

Naveen AutomationLabs

6 лет назад

157,297 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@bibekkumarbazaz647
@bibekkumarbazaz647 - 24.05.2020 15:44

The best video on memory management that I have come across. It gives a clear insight on how to write memory efficient code in Java.

Will appreciate if you can make a video on streaming and how it works internally.

Thanks a ton.

Ответить
@nandagopal375
@nandagopal375 - 11.04.2023 11:27

Thank you provide valuable information about Java memory management 🙏🙏🙏

Ответить
@mallikarjun-shurpali9698
@mallikarjun-shurpali9698 - 04.12.2022 06:33

Nice explanation sir..

Ответить
@dProfessor_
@dProfessor_ - 15.11.2022 16:17

Thanks Sir

Ответить
@ayushjain7555
@ayushjain7555 - 13.10.2022 21:56

Thank you.

Ответить
@yashasvirallabandi9070
@yashasvirallabandi9070 - 12.10.2022 21:48

Great explanation. Thank you!

Ответить
@anjaliaggarwal3884
@anjaliaggarwal3884 - 10.08.2022 23:05

What is created first a class or a stack

Ответить
@MrSpraveennaika
@MrSpraveennaika - 04.07.2022 17:51

My first nice video on Memory Management 👌👌

Ответить
@saikiran2356
@saikiran2356 - 21.06.2022 23:30

Kutha chimpi para dhengaw anna.... Mid nyt kuda chaala interesting ga chusaa

Ответить
@shashankjakhmola6226
@shashankjakhmola6226 - 12.06.2022 21:38

Memory leak will come on only in heap area right? If yes then in that case what we need to do in that case?

Ответить
@shashankjakhmola6226
@shashankjakhmola6226 - 12.06.2022 21:36

As much as i have a knowledge till now permanent generation is separate memory are and stack is separate memory area . But in this video somewhere at the end you are saying parmanent memory is part of stack memory which is making me confused can you please explain on that ? Is both separate memory area or parmanent is part of stack. ?

Ответить
@shashankjakhmola6226
@shashankjakhmola6226 - 12.06.2022 21:31

If Test t = new Test() is defined as instance variable rather then defined inside some method like m1 method. In that case I understood that new test() will be creating one object inside the heap. But where the reference will be stored as it is not local variable it is instance variable ? And stack will store local variable and local references as much as i know?

Ответить
@nalithamsaisudha
@nalithamsaisudha - 11.06.2022 04:58

great explanation 👏

Ответить
@tianhaozhao6774
@tianhaozhao6774 - 12.05.2022 21:00

Permanent Generation is replaced by Metaspace in jdk8. What's the difference

Ответить
@nishant2242
@nishant2242 - 08.05.2022 04:29

Great explanation

Ответить
@ABAutomationHub
@ABAutomationHub - 17.04.2022 22:43

Best content on memory management..Thanks for sharing!

Ответить
@rafiq41cb
@rafiq41cb - 08.04.2022 00:40

If m1 calls m2, method block will be available to which method?

Ответить
@zajuzam
@zajuzam - 05.02.2022 19:01

Nice Explanation

Ответить
@aritrabhattacharya7722
@aritrabhattacharya7722 - 23.01.2022 21:21

Hello Sir, I have some questions:
So where exactly are new Strings stored (in heap or in stringpool directly)? And where is the stringpool located then (method area of permgen or heap)? There has been some changes in Java 7 and 8 to the permgen section. When does a string automatically move to striingpool provided intern methos is not called.
Thanks in advance :)

Ответить
@aritrabhattacharya7722
@aritrabhattacharya7722 - 23.01.2022 14:43

This was really helpful. Thanks a lot.

Ответить
@kshitij618
@kshitij618 - 12.01.2022 00:19

awesome man

Ответить
@123deepakkakkar
@123deepakkakkar - 04.01.2022 23:05

Is this java 7 model or java 8?

Ответить
@ShubhamGupta-du6ie
@ShubhamGupta-du6ie - 15.12.2021 12:56

Hi Naveen, How to perform GC for a particular object

Ответить
@DigantoPaul
@DigantoPaul - 28.10.2021 10:42

This is for Java 7 and lower. Please modify the video title to mention it is for lower version than Java 8

Ответить
@techy0716
@techy0716 - 19.10.2021 06:57

Best illustrated concept of memory management in java

Ответить
@nikitaojha8768
@nikitaojha8768 - 12.10.2021 21:30

Can you please explain the difference between java 7 and java 8 memory management .

Ответить
@sancharidas7532
@sancharidas7532 - 09.10.2021 17:01

What are JRE classes? The predefined classes or the ones which I have made ?? Someone help me understand please.

Ответить
@AhmedKhaled-he9mf
@AhmedKhaled-he9mf - 22.09.2021 08:33

very very nice explain

I become subscriber because this video

Ответить
@jeetupadhyaya2687
@jeetupadhyaya2687 - 04.09.2021 17:03

Thankyou for this video Naveen!

Ответить
@kunalsinha5942
@kunalsinha5942 - 30.08.2021 11:10

Thanks Naveen for such a informative video. I have a follow up question below:—

If we create any Collection I.e Arraylist , Hashmap etc .. where is it created .. in Heap or Stack?Since collections stores the the object references rather than physical objects..How does it manage the whole process?

Ответить
@niloybasu6508
@niloybasu6508 - 02.08.2021 19:47

Awesome explanation!!! Terrific!! Thanks a lot!!!

Ответить
@Fnaf-vh9cs
@Fnaf-vh9cs - 19.07.2021 21:43

nr.1

Ответить
@shijocg
@shijocg - 04.07.2021 04:38

Very informative. I have one doubt why the survivor memory classified as two, both have same usage and purpose?

Ответить
@lahcenechel1855
@lahcenechel1855 - 02.07.2021 12:12

hello thanks for the videos i have a question:

public c l a s s B e e rA p pli c a ti o n { // Main Cl a s s f o r t e s t s

public s t a t i c void main ( S t ri n g [ ] a r g s ) {
B o t tl e b1 ;
B e e r B o t tl e [ ] pack = new B e e r B o t tl e [ 3 ] ;
b1 = new B o t tl e ( 5 0 0 , 4 . 5 ) ;
B e e r B o t tl e b2 = new B e e r B o t tl e ( 3 3 3 , 4 . 0 , ”Corona ”)


for ( int k=0; k<pack . l e n g t h ; k++) {
pack [ k ] = new B e e r B o t tl e ( 3 3 3 , 4 . 8 , ”Bi t ”) ;
}
where does the int k go on the stack or heap? thank you

Ответить
@dupindersingh1599
@dupindersingh1599 - 30.06.2021 12:24

Question 1:
At the time of Major GC, will the JRE do only Major GC ? or JRE will perform its normal tasks and in parallel Major GC will perform
Question 2:
When you said we don't have to do the Major GC frequently, is there any code we write explicitly for GC? I think JRE itself take care of the Garbage collection.

Ответить
@sourabhhsethii7292
@sourabhhsethii7292 - 27.06.2021 17:04

Thanks for sharing this knowledge!

Ответить
@DheerajKapoor-km3vb
@DheerajKapoor-km3vb - 24.06.2021 08:59

we call a method , a method block is created what if we call another method from within a method
a new method block will be created?? if yes, then where inside the same method block or outside that method block?

Ответить
@asimghosh5737
@asimghosh5737 - 12.06.2021 12:05

Very nice👍👍👍 it's really helpful.

Ответить
@arijitbasu4397
@arijitbasu4397 - 05.06.2021 00:56

Such a quality content ❤️

Ответить
@GAGamingCOD
@GAGamingCOD - 01.06.2021 07:17

This video deserves more likes and views 🙏

Ответить
@mugeeshhk
@mugeeshhk - 30.05.2021 12:50

As per my understanding,
1. So at a time, one of the survivor space is always empty ? this correct ?
2. Objects that are survived after many cycles of GC, are moved to the Old generation memory space ?

Ответить
@supriyakumari8552
@supriyakumari8552 - 27.05.2021 09:44

great information, fine details. :)

Ответить
@parwana1000
@parwana1000 - 26.05.2021 22:14

Bow down to u ...TY so much

Ответить
@shankardayal6928
@shankardayal6928 - 24.05.2021 03:01

PermGen was part of Heap upto java 8.
From java 8, it had been removed.

Ответить
@svecww
@svecww - 22.03.2021 12:57

Thanku sir can u please share if u have any notes?

Ответить
@arvindmv7166
@arvindmv7166 - 17.03.2021 04:46

Very informative, but I was looking for information regarding MetaSpace.

Ответить
@AshutoshSingh-uc6nk
@AshutoshSingh-uc6nk - 11.03.2021 18:52

Thankyou sir for this 🔥🔥🔥 explanation

Ответить
@avishsharma3404
@avishsharma3404 - 17.02.2021 23:50

Great Explanation , this is something that I found deepen understanding of memory management. Thanks Naveen

Ответить
@rajajain786
@rajajain786 - 09.02.2021 10:01

Hi Naveen, just want to know each application create own JRE on server memory? also what is difference between JVM and JMM?

Ответить
@narainsankar
@narainsankar - 30.01.2021 10:43

Great explanation..

Ответить