Possible Duplicate:
What is a good easy to use profiler for C++ on Linux?
Is there some opensource memory profiling tools for embedded linux? I need to know the memory cost status of a certain program , so I want this tool have some features such as calculate how much memory used with malloc, how much stack/heap used in pthreads, and show the shared library's memory usage. is there some tools can qualify. thanks.