|
From: <in...@ha...> - 2007-05-14 14:55:11
|
<style> p {margin-top:0px;margin-bottom:0px;} </style>
<table border=0 width=100% bgcolor='' cellpadding=0 cellspacing=0 align=center>
<tr>
<td valign=top style='padding:8pt;'><font size=2 face='굴림'>
<P> </P>
<P>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR>
<TD style="PADDING-RIGHT: 8pt; PADDING-LEFT: 8pt; PADDING-BOTTOM: 8pt; PADDING-TOP: 8pt" vAlign=top><FONT face=굴림 size=2>
<DIV style="FONT-SIZE: 10pt; BACKGROUND: none transparent scroll repeat 0% 0%; FONT-FAMILY: Gulim">
<P><FONT face="Courier New">I tested ls's memory leak using valgrind 3.1.<BR>
I think that ls is ver good program and well programmed program.<BR>
When I test ls command, Why are 2 informations(malloc/free) mistaken?<BR>
I can't understand 85 alloc and 75 fress info about below output.<BR>
Why is number of malloc and free mistaken?</FONT></P>
<P><FONT face="Courier New">I wondered about 10 unfreed info ( 85 - 75 = 10 )<BR>
"==9049== malloc/free: 85 allocs, 75 frees, 27,309 bytes allocated."<BR>
<BR>
Belows is screenshot that I tested.<BR>
<BR>
-----------------------------------------------------------------<BR>
[invain@fc test8]$ valgrind --version<BR>
valgrind-3.1.0<BR>
[invain@fc test8]$ valgrind --tool=memcheck ls<BR>
==9049== Memcheck, a memory error detector.<BR>
==9049== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.<BR>
==9049== Using LibVEX rev 1471, a library for dynamic binary translation.<BR>
==9049== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.<BR>
==9049== Using valgrind-3.1.0, a dynamic binary instrumentation framework.<BR>
==9049== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.<BR>
==9049== For more details, rerun with: -v<BR>
==9049==<BR>
a.txt b.txt c.txt iconv_UTF8.txt<BR>
==9049==<BR>
==9049== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 24 from 1)<BR>
==9049== malloc/free: in use at exit: 13,165 bytes in 10 blocks.<BR>
==9049== malloc/free: 85 allocs, 75 frees, 27,309 bytes allocated.<BR>
==9049== For counts of detected errors, rerun with: -v<BR>
==9049== searching for pointers to 10 not-freed blocks.<BR>
==9049== checked 142,888 bytes.<BR>
==9049==<BR>
==9049== LEAK SUMMARY:<BR>
==9049== definitely lost: 0 bytes in 0 blocks.<BR>
==9049== possibly lost: 0 bytes in 0 blocks.<BR>
==9049== still reachable: 13,165 bytes in 10 blocks.<BR>
==9049== suppressed: 0 bytes in 0 blocks.<BR>
==9049== Reachable blocks (those to which a pointer was found) are not shown.<BR>
==9049== To see them, rerun with: --show-reachable=yes<BR>
[invain@fc test8]$</FONT><BR>
</P></DIV></FONT></TD></TR></TBODY></TABLE><!-- __Hanmail-sig-Start__ --><BR>
</P></font></td></tr>
</table>
<!-- __Hanmail-sig-Start__ -->
<br><br><br><font color=#003D82 style='font-size: 9pt;'>-------------------------------
<br>Geun Sik , Lim (INVAIN)
<br>CTO , Software Center, S/W Membership
<br>TEL : +82-031-217-9913
<br>FAX : +82-031-217-9914
<br>Mail: in...@ss...
<br>MSN: in...@ha...
<br>Home: http://invain.pe.kr
<br>♣꿈을 계속 간직하고 있으면 반드시 실현할 기회가 온다. - 괴테 -
<br>-------------------------------</font> <br><br><a href="mailto:in...@ha..."><img src="http://nametag.hanmail.net/13nyrt5dDGsEFEAng5sJUQ00" border="0"></a>
<!-- __Hanmail-sig-End__ -->
<!-- __Hanmail-tail-Start__ -->
<!-- __Hanmail-tail-End__ -->
<img src="http://premium65.hanmail.net:4280/@from=invain&rcpt=valgrind%2Dusers%40lists%2Esourceforge%2Enet&msgid=%3C20070514235502%2EHM%2El00000000052App%40invain%2Epremium65%2Ehanmail%2Enet%3E">
|