-------- Original-Nachricht --------
> Datum: Sun, 16 Dec 2007 23:59:07 +0100
> Von: "Steve" <[EMAIL PROTECTED]>
> An: dspam-dev@lists.nuclearelephant.com
> CC: [EMAIL PROTECTED]
> Betreff: [dspam-dev] 36 bytes

> Hallo all
> 
> 36 bytes are holding me back from getting dspam (the binary) free of
> memory leaks. Running with --client had +/- always those 36 byte leaking. But
> normal execution without --client was much higher. But now both of them are
> down to 36 bytes. I hate memory leaks! I want to get them all out of DSPAM.
> 
Never mind. Found the last 36 bytes leak. It is a bug (I think) in nss_compat.

When having compat in nsswitch.conf then I get this:
==12982== 156 (36 direct, 120 indirect) bytes in 1 blocks are definitely lost 
in loss record 22 of 32
==12982==    at 0x40208F0: malloc (in 
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==12982==    by 0x415CB4B: (within /lib/libc-2.6.1.so)
==12982==    by 0x415D17E: __nss_database_lookup (in /lib/libc-2.6.1.so)
==12982==    by 0x42C1EC9: ???
==12982==    by 0x42C282C: ???
==12982==    by 0x41183D1: getpwuid_r (in /lib/libc-2.6.1.so)
==12982==    by 0x4117DEF: getpwuid (in /lib/libc-2.6.1.so)
==12982==    by 0x804B4BE: main (dspam.c:127)
==12982==    by 0x40A0FF1: (below main) (in /lib/libc-2.6.1.so)
==12982==    by 0x804B350: (within /usr/bin/dspam)


If I switch away from compat to files or add files in front of the compat entry 
then the memory leak (both of them. The 36 direct and the 120 indirect) go away 
:)

Now I am down to zero memory leak with DSPAM. No matter what way I start or use 
DSPAM. :)

I still have a long way to go till I have all memory allocations under control:
==13028== malloc/free: 13,371 allocs, 13,287 frees, 4,002,198 bytes allocated.

But still. At least valgrind is not reporting any memory leaks.


> My initial installation had around 324 bytes memory leak every time dspam
> was called. I don't like to loose every 3'000 times 1 MB memory when a user
> corrects a classification.
> 
> Has any one installed valgrind on his system and could run a "valgrind
> --verbose --leak-resolution=high --leak-check=yes --tool=memcheck
> --show-reachable=yes --error-limit=no --show-below-main=yes" on his dspam 
> installation?
> Once with --client and once without --client (if possible) and post the
> output back to the list?
> 
> If you post output then it would be great to send a short info about what
> version of DSPAM and what arch you are using?
> 
> 
> // Steve

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

Reply via email to