|
From: William S. <wsc...@ak...> - 2007-11-14 15:37:17
|
I'm trying to track down some missing memory using valgrind. So far, I'm not finding it. The problem could be some kind of pilot error, so for now I'll simply describe what I'm trying to do, and how: o Linux environment. o Trying to track down something holding or losing memory in a server written in c++. o Program shows an enormous jump in memory use - both vss and rss - when "work in progress" hits 40K - 50K records. (Memory jumps 50 megs.) o When WIP has been processed, memory use never goes back down. o Dynamic memory use: - vanilla C++ - objects being new'd/deleted. - certain amount of malloc/free. - large user of standard library strings. o After WIP has been processed, if I feed another 40K - 50K input records, memory use does not jump again - making me doubt that this is in fact a leak. My suspicion is that it is the standard library allocator holding onto blocks of memory for reuse. But the valgrind summary - printed when the service exits - shows no memory use that comes close to explaining the high vss/rss size. The largest block of memory outstanding is due to "Deque". But that memory is 800KB, vs the 50 meg mystery. Here's the valgrind commandline I'm using. ./valgrind/coregrind/valgrind --leak-check=full --show-reachable=yes --trace-children=yes --log-file-exactly=/root/valgrind1 /a/bin/mybatcher Any ideas? |