|
From: Yeshurun, M. <mei...@in...> - 2005-07-15 07:58:46
|
As a temporary solution, I would change the program to terminate immediately after initialization, and compare the results. =20 Meir =20 ________________________________ From: val...@li... [mailto:val...@li...] On Behalf Of Deodhar, Ani Sent: Thursday, July 14, 2005 8:47 PM To: val...@li... Subject: [Valgrind-users] Need to know how to clear a leak table just after initialization =20 Hi=20 I am using valgrind 2.4.0 on RH7.3 (Linux 2.4.18-3bigmem #1 SMP, i686) with gcc 3.2.3 and SystemC 2.1Beta11.=20 libc.so version is 2.2.5=20 I am using valgrind as follows:=20 valgrind -v --tool=3Dmemcheck --leak-check=3Dyes --log-file=3Dvalt.log --num-callers=3D10 --trace-children=3Dyes --show-reachable=3Dyes <TEST = program to run> <test arguments> I am trying to debug a memory leak that causes my program to eatup from 32MB at startup to 4GB at end of the test (being a 32-bit application, it of course crashes beyond 4GB) What I see from the generated log file is a large number of memory leaks, many of which are presumed (in my circles) to be benign since they happen at initialization (a lot of variables, memories are new'ed at initialization and not necessarily the ones causing this huge memory leak) How do I filter out the generated report so that I ignore the "leaks" that happen in the beginning of the program and focus only on the blocks that cause this huge memory leak. Typically, I'd need to "clear the leak table" right before I kick of the systemC kernel and start a fresh leak table immediately after that (after the sc_start(-1) command) As an example, in mpatrol (another widely used tool), there's a way to clear the leak table using:=20 __mp_clearleaktable()=20 Is there such a utility in valgrind, that'll only report leaks after a certain point or allow clearing of the leak table by the user? Thanks much for the help=20 Ani Deodhar=20 =20 |