bug-rcs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: simple valgrind test found what appear to be serious memory problems


From: Paul Eggert
Subject: Re: simple valgrind test found what appear to be serious memory problems
Date: Mon, 04 Oct 2010 15:52:17 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8

On 10/04/10 15:14, Thien-Thi Nguyen wrote:
> At the moment, i am overhauling tests/, trying to decide whether or not
> to test against libparts.a (via src/yarrrr.c repurposing).  WDYT?

Sorry, I don't know what that means.

I tried the same simple test ("rlog INSTALL,v", with the same data
as before) and got the following results.  Have you looked into
those two "possibly lost" blocks?

It seems excessive that rlog should malloc 127 kB when
processing a 18 kB file.  Stock rlog allocates only 11 kB to
process the same file.  Why is the memory footprint so much
greater now?

Here are the outputs I get, from stock (RHEL 5) rlog and from
the latest git rlog, respectively.  This is x86-64.

bash-4.1$ valgrind /usr/bin/rlog /usr/local/cs/src/gcc/INSTALL >/dev/null
==31178== Memcheck, a memory error detector
==31178== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==31178== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==31178== Command: /usr/bin/rlog /usr/local/cs/src/gcc/INSTALL
==31178==
==31178==
==31178== HEAP SUMMARY:
==31178==     in use at exit: 6,433 bytes in 262 blocks
==31178==   total heap usage: 625 allocs, 363 frees, 10,708 bytes allocated
==31178==
==31178== LEAK SUMMARY:
==31178==    definitely lost: 0 bytes in 0 blocks
==31178==    indirectly lost: 0 bytes in 0 blocks
==31178==      possibly lost: 0 bytes in 0 blocks
==31178==    still reachable: 6,433 bytes in 262 blocks
==31178==         suppressed: 0 bytes in 0 blocks
==31178== Rerun with --leak-check=full to see details of leaked memory
==31178==
==31178== For counts of detected and suppressed errors, rerun with: -v
==31178== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4)
bash-4.1$ valgrind src/rlog /usr/local/cs/src/gcc/INSTALL >/dev/null
==31179== Memcheck, a memory error detector
==31179== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==31179== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==31179== Command: src/rlog /usr/local/cs/src/gcc/INSTALL
==31179==
==31179==
==31179== HEAP SUMMARY:
==31179==     in use at exit: 114,947 bytes in 13 blocks
==31179==   total heap usage: 22 allocs, 9 frees, 127,499 bytes allocated
==31179==
==31179== LEAK SUMMARY:
==31179==    definitely lost: 0 bytes in 0 blocks
==31179==    indirectly lost: 0 bytes in 0 blocks
==31179==      possibly lost: 8,128 bytes in 2 blocks
==31179==    still reachable: 106,819 bytes in 11 blocks
==31179==         suppressed: 0 bytes in 0 blocks
==31179== Rerun with --leak-check=full to see details of leaked memory
==31179==
==31179== For counts of detected and suppressed errors, rerun with: -v
==31179== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]