hi, I were trying to debug a program at work which is giving memory leaks. Would be nice if someone could explain this. This is what happens:
I try to run a program xx which gets most of its work done by a kernel module yy that is part of the same program package. This machine has 1gb ram installed. Before running xx, 'top' or 'free -m' will show around 170 mb used and the rest as free. but as soon as xx starts the memory usage goes up, which is expected. But it keeps eating away all the memory and by the time it completes just under 20mb memory remains. Even after xx is teminated the state of memory usage count remains high. My questions are general and are these: 1.since 'top' outputs give memory consumption by xx to be around .4% - .8% is it right to assume that the total memory comsumption going up is because of leak happening due to the yy kernel module. 2.Does the kernel impose any restriction on kernel modules regarding memory each can get with kmalloc. 3.Tutorials for decifering /proc/slabinfo. 'man proc' has helped but I would like bit more detailed documentation. 4.Suggestions on GNU tools for monitoring kernel module memory leaks. It would be good if I can specifically monitor just a single module. How good is valgrind. 5.How is it that the memory usage goes up very high leaving just under 20mb free on a 1gb machine but manages to keep the 20mb free. Does the kernel have any mechanism for dynamically detecting memory leaks and 'freeing' the concerned blocks. Thank you Justin PS: please refer prevous post for system configuration. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
