bull wrote:
could any one explain with example the following in a better way
to understand
1. what is stack in memory, how the programs are stored in stack ,
what is the use of stack
2. What is heap in memory, how the programs are stored in heap ,
what is the use of heap
3. what is pool memory otherwise memory pool, what is the use of
memory pool
4. what is difference between stack and heap
5. what is the difference b/w pool and stack
6. what is the difference b/w pool and heap
None of those things necessarily exist in C. We have automatic
memory, which is allocated on function entry and deallocated on
function exit, and static memory, which is allocated until program
completion. A subset of static memory is controlled memory,
assigned by malloc, realloc, and calloc, and released by free.
Where and how these things are supplied has nothing to do with a C
program.
Some systems use a stack for automatic memory, but this is not the
only possible method.
--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson