Hi Mark, I tried the following:
./configure --disable-debug-mode make clean all copy my libs to the right places and compile test_event.c This is the result: $ valgrind --leak-check=full --show-reachable=yes ./test_event.exe ==28671== Memcheck, a memory error detector ==28671== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. ==28671== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info ==28671== Command: ./test_event.exe ==28671== ==28671== ==28671== HEAP SUMMARY: ==28671== in use at exit: 80 bytes in 2 blocks ==28671== total heap usage: 40 allocs, 38 frees, 4,350 bytes allocated ==28671== ==28671== 40 bytes in 1 blocks are still reachable in loss record 1 of 2 ==28671== at 0x4C2815C: malloc (vg_replace_malloc.c:236) ==28671== by 0x4D1309: evthread_posix_lock_alloc (evthread_pthread.c:48) ==28671== by 0x4C8463: evsig_global_setup_locks_ (signal.c:440) ==28671== by 0x4B50F7: event_global_setup_locks_ (event.c:2832) ==28671== by 0x4D10FC: evthread_use_pthreads (evthread_pthread.c:187) ==28671== by 0x404145: main (test_event.c:6) ==28671== ==28671== 40 bytes in 1 blocks are still reachable in loss record 2 of 2 ==28671== at 0x4C2815C: malloc (vg_replace_malloc.c:236) ==28671== by 0x4D1309: evthread_posix_lock_alloc (evthread_pthread.c:48) ==28671== by 0x4C6B93: evutil_secure_rng_global_setup_locks_ (evutil_rand.c:106) ==28671== by 0x4B510E: event_global_setup_locks_ (event.c:2834) ==28671== by 0x4D10FC: evthread_use_pthreads (evthread_pthread.c:187) ==28671== by 0x404145: main (test_event.c:6) ==28671== ==28671== LEAK SUMMARY: ==28671== definitely lost: 0 bytes in 0 blocks ==28671== indirectly lost: 0 bytes in 0 blocks ==28671== possibly lost: 0 bytes in 0 blocks ==28671== still reachable: 80 bytes in 2 blocks ==28671== suppressed: 0 bytes in 0 blocks ==28671== ==28671== For counts of detected and suppressed errors, rerun with: -v ==28671== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4) As far as I can see, if I disable debug mode, only this line: 2830 EVTHREAD_SETUP_GLOBAL_LOCK(_event_debug_map_lock, 0); is ignored. To completely get rid of leaks, I would have to disable thread support (which in my programs I use). Maybe I'm missing something? It's ./configure --disable-debug-mode enough to disable debug, or there are more flags which I missed? Thank you, Andrei On Mon, Jul 11, 2011 at 6:30 PM, Mark Ellzey <mtho...@strcpy.net> wrote: > int > event_global_setup_locks_(const int enable_locks) > { > #ifndef _EVENT_DISABLE_DEBUG_MODE > EVTHREAD_SETUP_GLOBAL_LOCK(_event_debug_map_lock, 0); > #endif > > is your issue. so yeah, --disable-debug-mode will fix that problem. > > On Mon, Jul 11, 2011 at 11:26:28AM -0500, Mark Ellzey wrote: > > On Mon, Jul 11, 2011 at 06:06:22PM +0200, Andrei Chirila wrote: > > > Hello, > > > > > > I just tried with the latest: > > > > > > > Try compiling with --disable-debug-mode > > *********************************************************************** > > To unsubscribe, send an e-mail to majord...@freehaven.net with > > unsubscribe libevent-users in the body. > *********************************************************************** > To unsubscribe, send an e-mail to majord...@freehaven.net with > unsubscribe libevent-users in the body. > -- Mobile: +49 151 42647382 e-Mail: andre...@gmail.com