What are the difference between heap and stack, Computer Engineering

Assignment Help:

What are the difference between heap and stack?

The Stack is more or less responsible for maintaining track of what's executing into our code or what's been "called". The Heap is less or more responsible for maintain track of our things (our data, well... most of this - we'll get to which later).

Think of the Stack like a series of boxes stacked one onto top of the subsequently. We remain track of what's going on into our application by stacking other box on top every time we call a process (termed as a Frame). We can only utilize what's in the top box onto the stack. While we're completed with the top box (the way is done executing) we throw this away and proceed to use the stuff into the prior box on the top of the stack. The Heap is same accept which its purpose is to hold information as not remain track of execution most of the time, therefore anything in our Heap can be accessed at any time. Along with the Heap, there are no constraints like to what can be accessed as in the stack. The Heap is as the heap of clean laundry onto our bed which we have not taken the time to put away until now - we can grab what we require quickly. The Stack is as the stack of shoe boxes into the closet where we have to take off the top one to find to the one underneath this.


Related Discussions:- What are the difference between heap and stack

Programs, A palindrome is a string that reads the same from both the ends. ...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Explain the different fields of an instructions, Explain the significance o...

Explain the significance of different fields of an instruction An instruction is a command given to a computer to perform a particular operation on some given data and the form

How do we bind keys to menus for shortcuts in gimp, Make ensure that "Use d...

Make ensure that "Use dynamic keyboard shortcuts" option in "Interface" tab of Preferences dialog is enabled, then go to the menu selection you are interested in. Keeping it select

What is macro-expansion, What is macro-expansion? Macro calls lead to m...

What is macro-expansion? Macro calls lead to macro expansion. Throughout macro expansion, the macro call statement is replaced through a sequence of assembly statements.

Superscalar processors, Superscalar Processors In scalar processors, on...

Superscalar Processors In scalar processors, only one instruction is implemented per cycle. That means only single instruction is issued per cycle and only single instruction i

Reprographic methods for information distribution, Reprographic Methods ...

Reprographic Methods i) Thermography ii) Dyeline jii) Microfiche iv) Fax In this unit you have learnt that: Used for Methods of reprography are used for the

Define bus, Define bus A group of lines that serves as a connecting pat...

Define bus A group of lines that serves as a connecting path for various devices is known as a bus.

Explain the edge-triggered j-k flip-flop, Explain the Edge-triggered J-K fl...

Explain the Edge-triggered J-K flip-flop? The J-K flip-flop works extremely similar to S-R flip-flop. The merely difference is that this flip-flop has NO invalid state.

What are various ids associated with a process, What are various IDs associ...

What are various IDs associated with a process? Unix identifies each process with a unique integer known as ProcessID. The process that implements the request for creation of a

Fetching a word from memory - computer architecture, Fetching a word from m...

Fetching a word from memory: CPU transfers the address of the needed information word to the memory address register (MAR). Address of the needed word is transferred to the pr

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd