Likita Shetty said:
(Fri, Jan 7, 2011 09:14:04 AM)
what is the difference between heap and stack .. i know stack works on the principle of last in first out and what about heap ?
(Wed, Mar 16, 2011 01:53:37 AM)
Heap area consist of hash codes .i.e. addreses while stack may or may not be.
(Tue, Apr 3, 2012 10:51:27 PM)
malloc and calloc allocates memory in heap.
(Sun, Apr 8, 2012 05:31:23 PM)
Like stack is First in first out, how does heap work ?
(Wed, Jun 20, 2012 12:51:33 PM)
The main difference between stack and heap is, Stack is last in first out. But heap is not related to that that concept. Heap is related to dynamic memory allocation. Heap is the area where the elements are stored in a dma. All the malloc() , realloc() and calloc() are related to dynamic memory alloction concepts.
(Fri, Mar 8, 2013 09:35:22 PM)
malloc() is dynamic memory allocation. So it is stored in Heep memory.