| [hwang@langchao test]$ cat testmtrace.c #include #include #include int main() { char *hello; mtrace(); hello = (char*) malloc(20); sprintf(hello," hello world!"); return 1; } [hwang@langchao test]$export MALLOC_TRACE=mytrace.log [hwang@langchao test]$ gcc testmtrace.c -o testmtrace [hwang@langchao test]$./testmtrace [hwang@langchao test]$ mtrace testmtrace mytrace.log Memory not freed: ----------------- Address Size Caller 0x08049860 0x14 at /usr/src/build/53700-i386/BUILD/glibc-2.2.4/csu/init.c:0 |