Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ==2064== Memcheck, a memory error detector
- ==2064== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
- ==2064== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
- ==2064== Command: ./g01
- ==2064==
- * Put 42
- 42: foo
- --------
- * Put 17
- 17: spam 42: foo
- --------
- * Put 23
- 17: spam 23: bar 42: foo
- --------
- Get 1: key not found!
- --------
- Get 42: foo
- --------
- Get 17: spam
- --------
- Get 23: bar
- --------
- * Del 1
- 17: spam 23: bar 42: foo
- --------
- * Del 23
- 17: spam 42: foo
- --------
- * Del 42
- 17: spam
- --------
- * Del 17
- --------
- ==2064==
- ==2064== HEAP SUMMARY:
- ==2064== in use at exit: 49 bytes in 3 blocks
- ==2064== total heap usage: 9 allocs, 6 frees, 239 bytes allocated
- ==2064==
- ==2064== 49 bytes in 3 blocks are definitely lost in loss record 1 of 1
- ==2064== at 0x402AB64: operator new(unsigned int) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
- ==2064== by 0x40D5663: std::string::_Rep::_S_create(unsigned int, unsigned int, std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.16)
- ==2064== by 0x40D78C7: char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag) (in /usr/lib/libstdc++.so.6.0.16)
- ==2064== by 0x40D7A35: std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.16)
- ==2064== by 0x418C482: (below main) (in /lib/libc-2.15.so)
- ==2064==
- ==2064== LEAK SUMMARY:
- ==2064== definitely lost: 49 bytes in 3 blocks
- ==2064== indirectly lost: 0 bytes in 0 blocks
- ==2064== possibly lost: 0 bytes in 0 blocks
- ==2064== still reachable: 0 bytes in 0 blocks
- ==2064== suppressed: 0 bytes in 0 blocks
- ==2064==
- ==2064== For counts of detected and suppressed errors, rerun with: -v
- ==2064== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
- [eue@aarika g01]$ valgrind --leak-check=full ./g01 > /dev/null
- ==2065== Memcheck, a memory error detector
- ==2065== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
- ==2065== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
- ==2065== Command: ./g01
- ==2065==
- ==2065==
- ==2065== HEAP SUMMARY:
- ==2065== in use at exit: 49 bytes in 3 blocks
- ==2065== total heap usage: 9 allocs, 6 frees, 239 bytes allocated
- ==2065==
- ==2065== 49 bytes in 3 blocks are definitely lost in loss record 1 of 1
- ==2065== at 0x402AB64: operator new(unsigned int) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
- ==2065== by 0x40D5663: std::string::_Rep::_S_create(unsigned int, unsigned int, std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.16)
- ==2065== by 0x40D78C7: char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag) (in /usr/lib/libstdc++.so.6.0.16)
- ==2065== by 0x40D7A35: std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.16)
- ==2065== by 0x418C482: (below main) (in /lib/libc-2.15.so)
- ==2065==
- ==2065== LEAK SUMMARY:
- ==2065== definitely lost: 49 bytes in 3 blocks
- ==2065== indirectly lost: 0 bytes in 0 blocks
- ==2065== possibly lost: 0 bytes in 0 blocks
- ==2065== still reachable: 0 bytes in 0 blocks
- ==2065== suppressed: 0 bytes in 0 blocks
- ==2065==
- ==2065== For counts of detected and suppressed errors, rerun with: -v
- ==2065== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement