
Sorry, I've been out of town and I just got back in. Here you go: $ valgrind -v threadgroup ==19432== Memcheck, a memory error detector. ==19432== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. ==19432== Using LibVEX rev 1606, a library for dynamic binary translation. ==19432== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==19432== Using valgrind-3.2.0, a dynamic binary instrumentation framework. ==19432== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==19432== --19432-- Command line --19432-- threadgroup --19432-- Startup, with flags: --19432-- --memcheck:leak-check=full --19432-- --memcheck:error-limit=no --19432-- --memcheck:num-callers=20 --19432-- --memcheck:leak-resolution=high --19432-- --memcheck:show-reachable=yes --19432-- --memcheck:show-below-main=yes --19432-- --memcheck:trace-children=yes --19432-- --memcheck:gen-suppressions=no --19432-- -v --19432-- Contents of /proc/version: --19432-- Linux version 2.6.18-gentoo-r3 () (gcc version 4.1.1 (Gentoo 4.1.1-r1)) #7 SMP Fri Dec 8 15:47:16 CST 2006 --19432-- Arch and hwcaps: X86, x86-sse1-sse2 --19432-- Valgrind library directory: /usr/lib/valgrind --19432-- Reading syms from /lib/ld-2.4.so (0x4000000) --19432-- Reading syms from /home/pete/src/C_tests/boost_threads_group/threadgroup (0x8048000) --19432-- Reading syms from /usr/lib/valgrind/x86-linux/memcheck (0x38000000) --19432-- object doesn't have a symbol table --19432-- object doesn't have a dynamic symbol table --19432-- Reading suppressions file: /usr/lib/valgrind/default.supp --19432-- REDIR: 0x4014610 (index) redirected to 0x3801CC0B (???) --19432-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_core.so (0x401C000) --19432-- object doesn't have a symbol table --19432-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so (0x401E000) --19432-- object doesn't have a symbol table ==19432== WARNING: new redirection conflicts with existing -- ignoring it --19432-- new: 0x04014610 (index ) R-> 0x04020DCA index --19432-- Reading syms from /home/pete/lib/libboost_thread-gcc41-mt-d-1_35.so.1.35.0 (0x4023000) --19432-- Reading syms from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libstdc++.so.6.0.8 (0x4085000) --19432-- object doesn't have a symbol table --19432-- Reading syms from /lib/libm-2.4.so (0x415E000) --19432-- object doesn't have a symbol table --19432-- Reading syms from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libgcc_s.so.1 (0x4182000) --19432-- object doesn't have a symbol table --19432-- Reading syms from /lib/libc-2.4.so (0x418D000) --19432-- object doesn't have a symbol table --19432-- Reading syms from /lib/librt-2.4.so (0x42A4000) --19432-- object doesn't have a symbol table --19432-- Reading syms from /lib/libpthread-2.4.so (0x42AD000) --19432-- REDIR: 0x41F4E50 (memset) redirected to 0x402135B (memset) --19432-- REDIR: 0x41F52F0 (memcpy) redirected to 0x4021106 (memcpy) --19432-- REDIR: 0x41F4000 (rindex) redirected to 0x4020D1A (rindex) --19432-- REDIR: 0x4131C80 (operator new(unsigned)) redirected to 0x4020872 (operator new(unsigned)) --19432-- REDIR: 0x41F0CE9 (calloc) redirected to 0x401F626 (calloc) --19432-- REDIR: 0x4130908 (operator delete(void*)) redirected to 0x401FB95 (operator delete(void*)) --19432-- REDIR: 0x41EF06E (free) redirected to 0x401FE3D (free) ==19432== ==19432== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 25 from 1) --19432-- --19432-- supp: 25 Fedora-Core-5-hack3-ld24 ==19432== malloc/free: in use at exit: 144 bytes in 1 blocks. ==19432== malloc/free: 3 allocs, 2 frees, 164 bytes allocated. ==19432== ==19432== searching for pointers to 1 not-freed blocks. ==19432== checked 8,515,228 bytes. ==19432== ==19432== 144 bytes in 1 blocks are possibly lost in loss record 1 of 1 ==19432== at 0x401F6A5: calloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==19432== by 0x401017A: allocate_dtv (in /lib/ld-2.4.so) ==19432== by 0x4010224: _dl_allocate_tls (in /lib/ld-2.4.so) ==19432== by 0x42B289F: pthread_create@@GLIBC_2.1 (in /lib/libpthread-2.4.so) ==19432== by 0x4050213: boost::thread::thread(boost::function0<void, std::allocator<boost::function_base> > const&) (thread.cpp:171) ==19432== by 0x40502F3: boost::thread_group::create_thread(boost::function0<void, std::allocator<boost::function_base> > const&) (thread.cpp:338) ==19432== by 0x8048B49: main (threadgroup.cpp:12) ==19432== by 0x41A2863: (below main) (in /lib/libc-2.4.so) ==19432== by 0x8048A08: (within /home/pete/src/C_tests/boost_threads_group/threadgroup) ==19432== ==19432== LEAK SUMMARY: ==19432== definitely lost: 0 bytes in 0 blocks. ==19432== possibly lost: 144 bytes in 1 blocks. ==19432== still reachable: 0 bytes in 0 blocks. ==19432== suppressed: 0 bytes in 0 blocks. --19432-- memcheck: sanity checks: 3 cheap, 1 expensive --19432-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use --19432-- memcheck: auxmaps: 0 searches, 0 comparisons --19432-- memcheck: SMs: n_issued = 14 (224k, 0M) --19432-- memcheck: SMs: n_deissued = 0 (0k, 0M) --19432-- memcheck: SMs: max_noaccess = 65535 (1048560k, 1023M) --19432-- memcheck: SMs: max_undefined = 0 (0k, 0M) --19432-- memcheck: SMs: max_defined = 162 (2592k, 2M) --19432-- memcheck: SMs: max_non_DSM = 14 (224k, 0M) --19432-- memcheck: max sec V bit nodes: 0 (0k, 0M) --19432-- memcheck: set_sec_vbits8 calls: 0 (new: 0, updates: 0) --19432-- memcheck: max shadow mem size: 528k, 0M --19432-- translate: fast SP updates identified: 4,395 ( 92.4%) --19432-- translate: generic_known SP updates identified: 261 ( 5.4%) --19432-- translate: generic_unknown SP updates identified: 100 ( 2.1%) --19432-- tt/tc: 6,275 tt lookups requiring 6,452 probes --19432-- tt/tc: 6,275 fast-cache updates, 2 flushes --19432-- transtab: new 3,126 (67,048 -> 1,127,737; ratio 168:10) [0 scs] --19432-- transtab: dumped 0 (0 -> ??) --19432-- transtab: discarded 0 (0 -> ??) --19432-- scheduler: 395,790 jumps (bb entries). --19432-- scheduler: 3/3,301 major/minor sched events. --19432-- sanity: 4 cheap, 1 expensive checks. --19432-- exectx: 30,011 lists, 13 contexts (avg 0 per list) --19432-- exectx: 30 searches, 17 full compares (566 per 1000) --19432-- exectx: 0 cmp2, 67 cmp4, 0 cmpAll Here's the code: #include <boost/bind.hpp> #include <boost/thread.hpp> #include <iostream> void fn(void){ } int main() { boost::thread_group thrd; thrd.create_thread(&fn); thrd.join_all(); } On Sat, Jan 20, 2007 at 08:06:45PM +0100, Roland Schwarz wrote:
Pete,
could you please post the output from your valgrind run?
Thanky you, Roland
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users