for heap, i would say usage of malloc_hook

refer
http://www.kernel.org/doc/man-pages/online/pages/man3/malloc_hook.3.html

essentially a layer it put above malloc layer for managing memory allocation

here the recording on heap can be done


for stack size, print the variable address as soon a you enter a function
say main, and then
where ever you want an estimate, declare an auto variable and print its
address

canary concept is also good to make the fundamentals

http://en.wikipedia.org/wiki/Stack_buffer_overflow


Best Regards
Ashish Goel
"Think positive and find fuel in failure"
+919985813081
+919966006652


On Tue, Jul 6, 2010 at 9:30 AM, sharad <sharad20073...@gmail.com> wrote:

> Without using sophisticated debuggers, how do you estimate the memory
> usage in your program? (Stack/Heap)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to