Hi all, One of our programmers asked me a C programming question today that I thought I'd ask this list about. Since there is already a thread of C programming questions for Linux systems.. We have a C program that has a memory leak. We are 100% sure it has a memory leak. We do not know how to go about discovering the cause or source of the memory leak. The program runs under Linux/glibc21 of course. Here is an output from lsof: [32] root@host.name:/root > lsof | grep post postman 23567 nobody cwd DIR 8,6 0 538752 /home/x/build/junk/src (deleted) postman 23567 nobody rtd DIR 8,6 4096 2 / postman 23567 nobody txt REG 8,6 144528 164860 /usr/local/bin/postman postman 23567 nobody mem REG 8,6 344890 373903 /lib/ld-2.1.2.so postman 23567 nobody mem REG 8,6 4118299 373910 /lib/libc-2.1.2.so postman 23567 nobody mem REG 8,6 247348 373941 /lib/libnss_files-2.1.2.so postman 23567 nobody 0r CHR 1,3 260134 /dev/null postman 23567 nobody 1u CHR 136,2 4 /dev/pts/2 postman 23567 nobody 2u CHR 136,2 4 /dev/pts/2 As you can see it is using 4MB of VM in libc 2.1.2 related functions. However, the total VM size of postman (according to ps & top) is 64MB. Apparently postman failing to release or otherwise cleaning up its malloc()ed memory. Our programmer says that he has been able to find memory leaks in the past using GUI tools such as MS Visual Studio for Windows programs. He has not been able to find an efficient tool for doing the same sort of searches for memory leaks in programs on Linux systems. We have almost ruled out gdb because it is so dense. Undoubtedly it has the functionality we want but it is very unfriendly. Let me know if any of you have any ideas, thanks! -- Jim Ockers (ockers@ockers.net) Contact info: please see http://www.ockers.net/ Fight Spam! Join CAUCE (Coalition Against Unsolicited Commercial Email) at http://www.cauce.org/ .