==5707== Memcheck, a memory error detector ==5707== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. ==5707== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info ==5707== Command: ./tutorial ==5707== Parent PID: 5706 ==5707== ==5707== ==5707== HEAP SUMMARY: ==5707== in use at exit: 1,050,667 bytes in 38 blocks ==5707== total heap usage: 693 allocs, 655 frees, 1,221,308 bytes allocated ==5707== ==5707== 30 bytes in 1 blocks are possibly lost in loss record 8 of 38 ==5707== at 0x4A075BC: operator new(unsigned long) (vg_replace_malloc.c:298) ==5707== by 0x58B83C8: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x58B9DA9: std::string::_M_mutate(unsigned long, unsigned long, unsigned long) (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x58B9F6B: std::string::_M_replace_safe(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x55D23AE: mongo::ProcessInfo::SystemInfo::collectSystemInfo() (basic_string.h:975) ==5707== by 0x55C7163: mongo::ProcessInfo::initializeSystemInfo() (processinfo.h:149) ==5707== by 0x55C7208: mongo::_mongoInitializerFunction_SystemInfo(mongo::InitializerContext*) (processinfo.cpp:65) ==5707== by 0x550981B: boost::detail::function::function_invoker1::invoke(boost::detail::function::function_buffer&, mongo::InitializerContext*) (function_template.hpp:95) ==5707== by 0x5509D1B: mongo::Initializer::execute(std::vector > const&, std::map, std::allocator > > const&) const (function_template.hpp:767) ==5707== by 0x550A391: mongo::runGlobalInitializers(std::vector > const&, std::map, std::allocator > > const&) (initializer.cpp:58) ==5707== by 0x550A77F: mongo::runGlobalInitializers(int, char const* const*, char const* const*) (initializer.cpp:77) ==5707== by 0x556619F: mongo::client::initialize(bool) (init.cpp:46) ==5707== ==5707== 31 bytes in 1 blocks are possibly lost in loss record 9 of 38 ==5707== at 0x4A075BC: operator new(unsigned long) (vg_replace_malloc.c:298) ==5707== by 0x58B83C8: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x58B9DA9: std::string::_M_mutate(unsigned long, unsigned long, unsigned long) (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x58B9F6B: std::string::_M_replace_safe(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x55D24B3: mongo::ProcessInfo::SystemInfo::collectSystemInfo() (basic_string.h:975) ==5707== by 0x55C7163: mongo::ProcessInfo::initializeSystemInfo() (processinfo.h:149) ==5707== by 0x55C7208: mongo::_mongoInitializerFunction_SystemInfo(mongo::InitializerContext*) (processinfo.cpp:65) ==5707== by 0x550981B: boost::detail::function::function_invoker1::invoke(boost::detail::function::function_buffer&, mongo::InitializerContext*) (function_template.hpp:95) ==5707== by 0x5509D1B: mongo::Initializer::execute(std::vector > const&, std::map, std::allocator > > const&) const (function_template.hpp:767) ==5707== by 0x550A391: mongo::runGlobalInitializers(std::vector > const&, std::map, std::allocator > > const&) (initializer.cpp:58) ==5707== by 0x550A77F: mongo::runGlobalInitializers(int, char const* const*, char const* const*) (initializer.cpp:77) ==5707== by 0x556619F: mongo::client::initialize(bool) (init.cpp:46) ==5707== ==5707== 33 bytes in 1 blocks are possibly lost in loss record 11 of 38 ==5707== at 0x4A075BC: operator new(unsigned long) (vg_replace_malloc.c:298) ==5707== by 0x58B83C8: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x58B8DE4: ??? (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x58B8F32: std::basic_string, std::allocator >::basic_string(char const*, std::allocator const&) (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x55B6677: global constructors keyed to log.cpp (log.cpp:140) ==5707== by 0x55D50A5: ??? (in /root/mongo-driver-install/lib/libmongoclient.so) ==5707== by 0x5502FA2: ??? (in /root/mongo-driver-install/lib/libmongoclient.so) ==5707== ==5707== 40 bytes in 1 blocks are possibly lost in loss record 23 of 38 ==5707== at 0x4A075BC: operator new(unsigned long) (vg_replace_malloc.c:298) ==5707== by 0x58B83C8: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x58B8DE4: ??? (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x58B8F32: std::basic_string, std::allocator >::basic_string(char const*, std::allocator const&) (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x55B66AA: global constructors keyed to log.cpp (log.cpp:141) ==5707== by 0x55D50A5: ??? (in /root/mongo-driver-install/lib/libmongoclient.so) ==5707== by 0x5502FA2: ??? (in /root/mongo-driver-install/lib/libmongoclient.so) ==5707== ==5707== 40 bytes in 1 blocks are definitely lost in loss record 24 of 38 ==5707== at 0x4A075BC: operator new(unsigned long) (vg_replace_malloc.c:298) ==5707== by 0x555B69C: mongo::mutex::mutex(char const*) (mutex.h:79) ==5707== by 0x559E0EE: mongo::BackgroundJob::BackgroundJob(bool) (background.cpp:123) ==5707== by 0x5547A9F: global constructors keyed to dbclient_rs.cpp (dbclient_rs.cpp:68) ==5707== by 0x55D50A5: ??? (in /root/mongo-driver-install/lib/libmongoclient.so) ==5707== by 0x5502FA2: ??? (in /root/mongo-driver-install/lib/libmongoclient.so) ==5707== ==5707== 52 bytes in 1 blocks are possibly lost in loss record 30 of 38 ==5707== at 0x4A075BC: operator new(unsigned long) (vg_replace_malloc.c:298) ==5707== by 0x58B83C8: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x58B9DA9: std::string::_M_mutate(unsigned long, unsigned long, unsigned long) (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x58B9F6B: std::string::_M_replace_safe(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x55D3FD9: mongo::LinuxSysHelper::getLinuxDistro(std::string&, std::string&) (basic_string.h:975) ==5707== by 0x55D237A: mongo::ProcessInfo::SystemInfo::collectSystemInfo() (processinfo_linux2.cpp:401) ==5707== by 0x55C7163: mongo::ProcessInfo::initializeSystemInfo() (processinfo.h:149) ==5707== by 0x55C7208: mongo::_mongoInitializerFunction_SystemInfo(mongo::InitializerContext*) (processinfo.cpp:65) ==5707== by 0x550981B: boost::detail::function::function_invoker1::invoke(boost::detail::function::function_buffer&, mongo::InitializerContext*) (function_template.hpp:95) ==5707== by 0x5509D1B: mongo::Initializer::execute(std::vector > const&, std::map, std::allocator > > const&) const (function_template.hpp:767) ==5707== by 0x550A391: mongo::runGlobalInitializers(std::vector > const&, std::map, std::allocator > > const&) (initializer.cpp:58) ==5707== by 0x550A77F: mongo::runGlobalInitializers(int, char const* const*, char const* const*) (initializer.cpp:77) ==5707== ==5707== 53 bytes in 1 blocks are possibly lost in loss record 31 of 38 ==5707== at 0x4A075BC: operator new(unsigned long) (vg_replace_malloc.c:298) ==5707== by 0x58B83C8: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator const&) (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x58B919A: std::string::_Rep::_M_clone(std::allocator const&, unsigned long) (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x58B95EB: std::string::reserve(unsigned long) (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x58B9ABE: std::string::append(std::string const&) (in /usr/lib64/libstdc++.so.6.0.13) ==5707== by 0x55D404F: mongo::LinuxSysHelper::getLinuxDistro(std::string&, std::string&) (basic_string.h:796) ==5707== by 0x55D237A: mongo::ProcessInfo::SystemInfo::collectSystemInfo() (processinfo_linux2.cpp:401) ==5707== by 0x55C7163: mongo::ProcessInfo::initializeSystemInfo() (processinfo.h:149) ==5707== by 0x55C7208: mongo::_mongoInitializerFunction_SystemInfo(mongo::InitializerContext*) (processinfo.cpp:65) ==5707== by 0x550981B: boost::detail::function::function_invoker1::invoke(boost::detail::function::function_buffer&, mongo::InitializerContext*) (function_template.hpp:95) ==5707== by 0x5509D1B: mongo::Initializer::execute(std::vector > const&, std::map, std::allocator > > const&) const (function_template.hpp:767) ==5707== by 0x550A391: mongo::runGlobalInitializers(std::vector > const&, std::map, std::allocator > > const&) (initializer.cpp:58) ==5707== ==5707== LEAK SUMMARY: ==5707== definitely lost: 40 bytes in 1 blocks ==5707== indirectly lost: 0 bytes in 0 blocks ==5707== possibly lost: 239 bytes in 6 blocks ==5707== still reachable: 1,050,388 bytes in 31 blocks ==5707== suppressed: 0 bytes in 0 blocks ==5707== Reachable blocks (those to which a pointer was found) are not shown. ==5707== To see them, rerun with: --leak-check=full --show-reachable=yes ==5707== ==5707== For counts of detected and suppressed errors, rerun with: -v ==5707== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 8 from 6)