![]() ![]() When we need requirement of memory in the runtime without not fixed size heap is there for us. Heap is something different in terms of ideology from the stack, Where stack is all about occurring of function call in the series with fixed memory size but in the case of Heap it is all Dynamic. All the local Variables are also stored in the Stack as well. It gets executed at the end of the Stack, All the other Function based on calls sit on each other in the stack. Main() function call sits on the bottom of the stack. ![]() Stack is container of one and many functions with the static memory allocated to it, All the memory to stack is allocated before the compile time and it remains same throughout the whole life cycle of application, if there comes more requirement of memory than the allocated one it becomes famous “Stack-over-flow. Whole memory is divided into major three parts, Stack, Heap, Code(Text), Global variables and Constant’s Section, As from the name of last two it can be concluded easily that these parts are responsible for storage of Global Variable and keeping the source code, Other two important parts left are Stack and Heap. We can also say that this process is unified either you are using ThreadPool or Process Pool. There are various parts which are responsible to make one complete set of memory which is responsible for Execution and life cycle of application or process. ![]() Conclusion based on performance and Ease of use. Introduction to working of Stack and Heap inside Memory. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |