Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What's different between stack memory and heap memory?

user-image
Question ajoutée par George Yaney , Document Controller , national steel fabrication (nsf)
Date de publication: 2013/11/22
Aya Taleb
par Aya Taleb , Senior Web Developer / Team Leader , Bayt.com / Talentera

Hi George,

Here are the main differences:

 

Stack memory:

  • Is a data structure to storing data using the LIFO algo (last in first out).
  • Will be removed once the program go out - end running - the scope of its declaration OR all items were poped out.

Heap memory:

  • Is a data structure to storing and retrieving data using the pointers and addresses in memory ( the items locations are not ordered sequentially).
  • Will not be removed untill you remove it manually using the garbage collection.

 

Regards,

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?