Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.26 KB | None | 0 0
  1. ==30240== Memcheck, a memory error detector
  2. ==30240== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
  3. ==30240== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
  4. ==30240== Command: ./lab7
  5. ==30240==
  6. --30240-- Valgrind options:
  7. --30240-- --leak-check=full
  8. --30240-- -v
  9. --30240-- Contents of /proc/version:
  10. --30240-- Linux version 4.8.0-0.bpo.2-amd64 (debian-kernel@lists.debian.org) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 SMP Debian 4.8.11-1~bpo8+1 (2016-12-14)
  11. --30240-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-rdtscp-sse3-avx
  12. --30240-- Page sizes: currently 4096, max supported 4096
  13. --30240-- Valgrind library directory: /usr/lib/valgrind
  14. --30240-- Reading syms from /import/linux/home/wmclaug1/cs240/lab7/lab7
  15. --30240-- Reading syms from /lib/x86_64-linux-gnu/ld-2.19.so
  16. --30240-- Considering /lib/x86_64-linux-gnu/ld-2.19.so ..
  17. --30240-- .. CRC mismatch (computed 7344611e wanted f41c2786)
  18. --30240-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.19.so ..
  19. --30240-- .. CRC is valid
  20. --30240-- Reading syms from /usr/lib/valgrind/memcheck-amd64-linux
  21. --30240-- Considering /usr/lib/valgrind/memcheck-amd64-linux ..
  22. --30240-- .. CRC mismatch (computed 948bf0bc wanted d423983b)
  23. --30240-- Considering /usr/lib/debug/usr/lib/valgrind/memcheck-amd64-linux ..
  24. --30240-- .. CRC is valid
  25. --30240-- object doesn't have a dynamic symbol table
  26. --30240-- Scheduler: using generic scheduler lock implementation.
  27. --30240-- Reading suppressions file: /usr/lib/valgrind/default.supp
  28. ==30240== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-30240-by-wmclaug1-on-remote05
  29. ==30240== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-30240-by-wmclaug1-on-remote05
  30. ==30240== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-30240-by-wmclaug1-on-remote05
  31. ==30240==
  32. ==30240== TO CONTROL THIS PROCESS USING vgdb (which you probably
  33. ==30240== don't want to do, unless you know exactly what you're doing,
  34. ==30240== or are doing some strange experiment):
  35. ==30240== /usr/lib/valgrind/../../bin/vgdb --pid=30240 ...command...
  36. ==30240==
  37. ==30240== TO DEBUG THIS PROCESS USING GDB: start GDB like this
  38. ==30240== /path/to/gdb ./lab7
  39. ==30240== and then give GDB the following command
  40. ==30240== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=30240
  41. ==30240== --pid is optional if only one valgrind process is running
  42. ==30240==
  43. --30240-- REDIR: 0x4017920 (ld-linux-x86-64.so.2:strlen) redirected to 0x380bd821 (vgPlain_amd64_linux_REDIR_FOR_strlen)
  44. --30240-- Reading syms from /usr/lib/valgrind/vgpreload_core-amd64-linux.so
  45. --30240-- Considering /usr/lib/valgrind/vgpreload_core-amd64-linux.so ..
  46. --30240-- .. CRC mismatch (computed 9771ef88 wanted e8eb00cf)
  47. --30240-- Considering /usr/lib/debug/usr/lib/valgrind/vgpreload_core-amd64-linux.so ..
  48. --30240-- .. CRC is valid
  49. --30240-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
  50. --30240-- Considering /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so ..
  51. --30240-- .. CRC mismatch (computed c7f6cf2f wanted fb419f04)
  52. --30240-- Considering /usr/lib/debug/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so ..
  53. --30240-- .. CRC is valid
  54. ==30240== WARNING: new redirection conflicts with existing -- ignoring it
  55. --30240-- old: 0x04017920 (strlen ) R-> (0000.0) 0x380bd821 vgPlain_amd64_linux_REDIR_FOR_strlen
  56. --30240-- new: 0x04017920 (strlen ) R-> (2007.0) 0x04c2c260 strlen
  57. --30240-- REDIR: 0x40176d0 (ld-linux-x86-64.so.2:index) redirected to 0x4c2be10 (index)
  58. --30240-- REDIR: 0x40178f0 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4c2d310 (strcmp)
  59. --30240-- REDIR: 0x4018620 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4c2fe60 (mempcpy)
  60. --30240-- Reading syms from /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20
  61. --30240-- Considering /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20 ..
  62. --30240-- .. CRC mismatch (computed f6d204a2 wanted d62b96d7)
  63. --30240-- object doesn't have a symbol table
  64. --30240-- Reading syms from /lib/x86_64-linux-gnu/libm-2.19.so
  65. --30240-- Considering /lib/x86_64-linux-gnu/libm-2.19.so ..
  66. --30240-- .. CRC mismatch (computed b34e2f42 wanted cd531c90)
  67. --30240-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/libm-2.19.so ..
  68. --30240-- .. CRC is valid
  69. --30240-- Reading syms from /lib/x86_64-linux-gnu/libgcc_s.so.1
  70. --30240-- Considering /lib/x86_64-linux-gnu/libgcc_s.so.1 ..
  71. --30240-- .. CRC mismatch (computed e1528828 wanted 15fbad25)
  72. --30240-- object doesn't have a symbol table
  73. --30240-- Reading syms from /lib/x86_64-linux-gnu/libc-2.19.so
  74. --30240-- Considering /lib/x86_64-linux-gnu/libc-2.19.so ..
  75. --30240-- .. CRC mismatch (computed cd8269aa wanted 8318c513)
  76. --30240-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.19.so ..
  77. --30240-- .. CRC is valid
  78. --30240-- REDIR: 0x56dcdc0 (libc.so.6:strcasecmp) redirected to 0x4a23730 (_vgnU_ifunc_wrapper)
  79. --30240-- REDIR: 0x56df0b0 (libc.so.6:strncasecmp) redirected to 0x4a23730 (_vgnU_ifunc_wrapper)
  80. --30240-- REDIR: 0x56dc590 (libc.so.6:memcpy@GLIBC_2.2.5) redirected to 0x4a23730 (_vgnU_ifunc_wrapper)
  81. --30240-- REDIR: 0x56da910 (libc.so.6:rindex) redirected to 0x4c2baf0 (rindex)
  82. --30240-- REDIR: 0x56d8c10 (libc.so.6:strlen) redirected to 0x4c2c1a0 (strlen)
  83. --30240-- REDIR: 0x56dbff0 (libc.so.6:__GI_memcmp) redirected to 0x4c2eca0 (__GI_memcmp)
  84. --30240-- REDIR: 0x56d71c0 (libc.so.6:strcmp) redirected to 0x4a23730 (_vgnU_ifunc_wrapper)
  85. --30240-- REDIR: 0x56e8d70 (libc.so.6:__strcmp_sse2_unaligned) redirected to 0x4c2d1d0 (strcmp)
  86. --30240-- REDIR: 0xffffffffff600400 (???:???) redirected to 0x380bd80d (vgPlain_amd64_linux_REDIR_FOR_vtime)
  87.  
  88. TEST #1: Create an empty tree--30240-- REDIR: 0x56dbfb0 (libc.so.6:bcmp) redirected to 0x4a23730 (_vgnU_ifunc_wrapper)
  89. --30240-- REDIR: 0x579e420 (libc.so.6:__memcmp_sse4_1) redirected to 0x4c2ed20 (__memcmp_sse4_1)
  90.  
  91.  
  92. ========================PASS========================
  93.  
  94.  
  95. TEST #2: Insert values into the Tree
  96. --30240-- REDIR: 0x4e942d0 (libstdc++.so.6:operator new(unsigned long)) redirected to 0x4c29110 (operator new(unsigned long))
  97.  
  98. ========================PASS========================
  99.  
  100.  
  101. TEST #3: Cannot insert duplicate values into the Tree
  102.  
  103. ========================PASS========================
  104.  
  105.  
  106. TEST #4: Insert 1000 Values into the Tree
  107.  
  108. ========================PASS========================
  109.  
  110.  
  111. TEST #5: Find values in the tree
  112.  
  113. ========================PASS========================
  114.  
  115.  
  116. TEST #6: Find doesn't segfault on empty tree
  117.  
  118. ========================PASS========================
  119.  
  120.  
  121. TEST #7: Cannot remove node that is not in the tree
  122. --30240-- REDIR: 0x4e925b0 (libstdc++.so.6:operator delete(void*)) redirected to 0x4c2a2f0 (operator delete(void*))
  123. [1] [2] [3] [5] [6] [7] [8] [9] [10] [11] [12] [13]
  124.  
  125. ========================PASS========================
  126.  
  127.  
  128. TEST #8: Remove a leaf node
  129. --30240-- REDIR: 0x578e450 (libc.so.6:__memmove_ssse3_back) redirected to 0x4c2d470 (memcpy@GLIBC_2.2.5)
  130. [2] [3] [5] [6] [7] [8] [9] [10] [11] [12] [13]
  131.  
  132. ========================PASS========================
  133.  
  134.  
  135. TEST #9: Remove single branch using the Short Circuit algorithm
  136. [2] [3] [5] [6] [8] [9] [10] [11] [12] [13]
  137.  
  138. ========================PASS========================
  139.  
  140.  
  141. Test #10: Remove two branch node promoting a leaf node
  142. [2] [3] [5] [6] [8] [9] [11] [12] [13]
  143.  
  144. ========================PASS========================
  145.  
  146.  
  147. TEST #11: Remove two branch node promoting a 1 branch node using Short Circuit
  148. [2] [3] [5] [6] [8] [9] [12] [13]
  149.  
  150. ========================PASS========================
  151.  
  152.  
  153. TEST #12: Remove root with two branches
  154. [2] [3] [6] [8] [9] [12] [13]
  155.  
  156. ========================PASS========================
  157.  
  158.  
  159. TEST #13: Remove root with one branch
  160. [8] [9] [12] [13]
  161.  
  162. ========================PASS========================
  163.  
  164.  
  165. TEST #14: Remove root as leaf
  166.  
  167. ========================PASS========================
  168.  
  169.  
  170. TEST #15: Deep copy for a tree of 100 random values
  171.  
  172. ========================PASS========================
  173.  
  174.  
  175. TEST #16: Test deletion and Destructor
  176.  
  177. ========================PASS========================
  178.  
  179.  
  180. All Tests Passed.
  181. Don't forget to run with Valgrind and submit to Blackboard!
  182.  
  183. --30240-- REDIR: 0x56d3600 (libc.so.6:free) redirected to 0x4c29e20 (free)
  184. ==30240==
  185. ==30240== HEAP SUMMARY:
  186. ==30240== in use at exit: 2,240 bytes in 70 blocks
  187. ==30240== total heap usage: 1,234 allocs, 1,164 frees, 41,008 bytes allocated
  188. ==30240==
  189. ==30240== Searching for pointers to 70 not-freed blocks
  190. ==30240== Checked 186,024 bytes
  191. ==30240==
  192. ==30240== 256 bytes in 8 blocks are definitely lost in loss record 1 of 3
  193. ==30240== at 0x4C29180: operator new(unsigned long) (vg_replace_malloc.c:324)
  194. ==30240== by 0x402E42: BSTree::insert(int) (in /import/linux/home/wmclaug1/cs240/lab7/lab7)
  195. ==30240== by 0x401AFB: main (in /import/linux/home/wmclaug1/cs240/lab7/lab7)
  196. ==30240==
  197. ==30240== 384 bytes in 12 blocks are definitely lost in loss record 2 of 3
  198. ==30240== at 0x4C29180: operator new(unsigned long) (vg_replace_malloc.c:324)
  199. ==30240== by 0x402E42: BSTree::insert(int) (in /import/linux/home/wmclaug1/cs240/lab7/lab7)
  200. ==30240== by 0x4010D8: main (in /import/linux/home/wmclaug1/cs240/lab7/lab7)
  201. ==30240==
  202. ==30240== 1,600 bytes in 50 blocks are definitely lost in loss record 3 of 3
  203. ==30240== at 0x4C29180: operator new(unsigned long) (vg_replace_malloc.c:324)
  204. ==30240== by 0x402E42: BSTree::insert(int) (in /import/linux/home/wmclaug1/cs240/lab7/lab7)
  205. ==30240== by 0x40118C: main (in /import/linux/home/wmclaug1/cs240/lab7/lab7)
  206. ==30240==
  207. ==30240== LEAK SUMMARY:
  208. ==30240== definitely lost: 2,240 bytes in 70 blocks
  209. ==30240== indirectly lost: 0 bytes in 0 blocks
  210. ==30240== possibly lost: 0 bytes in 0 blocks
  211. ==30240== still reachable: 0 bytes in 0 blocks
  212. ==30240== suppressed: 0 bytes in 0 blocks
  213. ==30240==
  214. ==30240== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
  215. ==30240== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
  216. remote05:~/cs240/lab7> valgrind --leak-check=full -v ./lab7 >> valgrind.txt
  217. ==30241== Memcheck, a memory error detector
  218. ==30241== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
  219. ==30241== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
  220. ==30241== Command: ./lab7
  221. ==30241==
  222. --30241-- Valgrind options:
  223. --30241-- --leak-check=full
  224. --30241-- -v
  225. --30241-- Contents of /proc/version:
  226. --30241-- Linux version 4.8.0-0.bpo.2-amd64 (debian-kernel@lists.debian.org) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 SMP Debian 4.8.11-1~bpo8+1 (2016-12-14)
  227. --30241-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-rdtscp-sse3-avx
  228. --30241-- Page sizes: currently 4096, max supported 4096
  229. --30241-- Valgrind library directory: /usr/lib/valgrind
  230. --30241-- Reading syms from /import/linux/home/wmclaug1/cs240/lab7/lab7
  231. --30241-- Reading syms from /lib/x86_64-linux-gnu/ld-2.19.so
  232. --30241-- Considering /lib/x86_64-linux-gnu/ld-2.19.so ..
  233. --30241-- .. CRC mismatch (computed 7344611e wanted f41c2786)
  234. --30241-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.19.so ..
  235. --30241-- .. CRC is valid
  236. --30241-- Reading syms from /usr/lib/valgrind/memcheck-amd64-linux
  237. --30241-- Considering /usr/lib/valgrind/memcheck-amd64-linux ..
  238. --30241-- .. CRC mismatch (computed 948bf0bc wanted d423983b)
  239. --30241-- Considering /usr/lib/debug/usr/lib/valgrind/memcheck-amd64-linux ..
  240. --30241-- .. CRC is valid
  241. --30241-- object doesn't have a dynamic symbol table
  242. --30241-- Scheduler: using generic scheduler lock implementation.
  243. --30241-- Reading suppressions file: /usr/lib/valgrind/default.supp
  244. ==30241== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-30241-by-wmclaug1-on-remote05
  245. ==30241== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-30241-by-wmclaug1-on-remote05
  246. ==30241== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-30241-by-wmclaug1-on-remote05
  247. ==30241==
  248. ==30241== TO CONTROL THIS PROCESS USING vgdb (which you probably
  249. ==30241== don't want to do, unless you know exactly what you're doing,
  250. ==30241== or are doing some strange experiment):
  251. ==30241== /usr/lib/valgrind/../../bin/vgdb --pid=30241 ...command...
  252. ==30241==
  253. ==30241== TO DEBUG THIS PROCESS USING GDB: start GDB like this
  254. ==30241== /path/to/gdb ./lab7
  255. ==30241== and then give GDB the following command
  256. ==30241== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=30241
  257. ==30241== --pid is optional if only one valgrind process is running
  258. ==30241==
  259. --30241-- REDIR: 0x4017920 (ld-linux-x86-64.so.2:strlen) redirected to 0x380bd821 (vgPlain_amd64_linux_REDIR_FOR_strlen)
  260. --30241-- Reading syms from /usr/lib/valgrind/vgpreload_core-amd64-linux.so
  261. --30241-- Considering /usr/lib/valgrind/vgpreload_core-amd64-linux.so ..
  262. --30241-- .. CRC mismatch (computed 9771ef88 wanted e8eb00cf)
  263. --30241-- Considering /usr/lib/debug/usr/lib/valgrind/vgpreload_core-amd64-linux.so ..
  264. --30241-- .. CRC is valid
  265. --30241-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
  266. --30241-- Considering /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so ..
  267. --30241-- .. CRC mismatch (computed c7f6cf2f wanted fb419f04)
  268. --30241-- Considering /usr/lib/debug/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so ..
  269. --30241-- .. CRC is valid
  270. ==30241== WARNING: new redirection conflicts with existing -- ignoring it
  271. --30241-- old: 0x04017920 (strlen ) R-> (0000.0) 0x380bd821 vgPlain_amd64_linux_REDIR_FOR_strlen
  272. --30241-- new: 0x04017920 (strlen ) R-> (2007.0) 0x04c2c260 strlen
  273. --30241-- REDIR: 0x40176d0 (ld-linux-x86-64.so.2:index) redirected to 0x4c2be10 (index)
  274. --30241-- REDIR: 0x40178f0 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4c2d310 (strcmp)
  275. --30241-- REDIR: 0x4018620 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4c2fe60 (mempcpy)
  276. --30241-- Reading syms from /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20
  277. --30241-- Considering /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20 ..
  278. --30241-- .. CRC mismatch (computed f6d204a2 wanted d62b96d7)
  279. --30241-- object doesn't have a symbol table
  280. --30241-- Reading syms from /lib/x86_64-linux-gnu/libm-2.19.so
  281. --30241-- Considering /lib/x86_64-linux-gnu/libm-2.19.so ..
  282. --30241-- .. CRC mismatch (computed b34e2f42 wanted cd531c90)
  283. --30241-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/libm-2.19.so ..
  284. --30241-- .. CRC is valid
  285. --30241-- Reading syms from /lib/x86_64-linux-gnu/libgcc_s.so.1
  286. --30241-- Considering /lib/x86_64-linux-gnu/libgcc_s.so.1 ..
  287. --30241-- .. CRC mismatch (computed e1528828 wanted 15fbad25)
  288. --30241-- object doesn't have a symbol table
  289. --30241-- Reading syms from /lib/x86_64-linux-gnu/libc-2.19.so
  290. --30241-- Considering /lib/x86_64-linux-gnu/libc-2.19.so ..
  291. --30241-- .. CRC mismatch (computed cd8269aa wanted 8318c513)
  292. --30241-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.19.so ..
  293. --30241-- .. CRC is valid
  294. --30241-- REDIR: 0x56dcdc0 (libc.so.6:strcasecmp) redirected to 0x4a23730 (_vgnU_ifunc_wrapper)
  295. --30241-- REDIR: 0x56df0b0 (libc.so.6:strncasecmp) redirected to 0x4a23730 (_vgnU_ifunc_wrapper)
  296. --30241-- REDIR: 0x56dc590 (libc.so.6:memcpy@GLIBC_2.2.5) redirected to 0x4a23730 (_vgnU_ifunc_wrapper)
  297. --30241-- REDIR: 0x56da910 (libc.so.6:rindex) redirected to 0x4c2baf0 (rindex)
  298. --30241-- REDIR: 0x56d8c10 (libc.so.6:strlen) redirected to 0x4c2c1a0 (strlen)
  299. --30241-- REDIR: 0x56dbff0 (libc.so.6:__GI_memcmp) redirected to 0x4c2eca0 (__GI_memcmp)
  300. --30241-- REDIR: 0x56d71c0 (libc.so.6:strcmp) redirected to 0x4a23730 (_vgnU_ifunc_wrapper)
  301. --30241-- REDIR: 0x56e8d70 (libc.so.6:__strcmp_sse2_unaligned) redirected to 0x4c2d1d0 (strcmp)
  302. --30241-- REDIR: 0xffffffffff600400 (???:???) redirected to 0x380bd80d (vgPlain_amd64_linux_REDIR_FOR_vtime)
  303.  
  304. TEST #1: Create an empty tree--30241-- REDIR: 0x56dbfb0 (libc.so.6:bcmp) redirected to 0x4a23730 (_vgnU_ifunc_wrapper)
  305. --30241-- REDIR: 0x579e420 (libc.so.6:__memcmp_sse4_1) redirected to 0x4c2ed20 (__memcmp_sse4_1)
  306.  
  307.  
  308. ========================PASS========================
  309.  
  310.  
  311. TEST #2: Insert values into the Tree
  312. --30241-- REDIR: 0x4e942d0 (libstdc++.so.6:operator new(unsigned long)) redirected to 0x4c29110 (operator new(unsigned long))
  313.  
  314. ========================PASS========================
  315.  
  316.  
  317. TEST #3: Cannot insert duplicate values into the Tree
  318.  
  319. ========================PASS========================
  320.  
  321.  
  322. TEST #4: Insert 1000 Values into the Tree
  323.  
  324. ========================PASS========================
  325.  
  326.  
  327. TEST #5: Find values in the tree
  328.  
  329. ========================PASS========================
  330.  
  331.  
  332. TEST #6: Find doesn't segfault on empty tree
  333.  
  334. ========================PASS========================
  335.  
  336.  
  337. TEST #7: Cannot remove node that is not in the tree
  338. --30241-- REDIR: 0x4e925b0 (libstdc++.so.6:operator delete(void*)) redirected to 0x4c2a2f0 (operator delete(void*))
  339. [1] [2] [3] [5] [6] [7] [8] [9] [10] [11] [12] [13]
  340.  
  341. ========================PASS========================
  342.  
  343.  
  344. TEST #8: Remove a leaf node
  345. --30241-- REDIR: 0x578e450 (libc.so.6:__memmove_ssse3_back) redirected to 0x4c2d470 (memcpy@GLIBC_2.2.5)
  346. [2] [3] [5] [6] [7] [8] [9] [10] [11] [12] [13]
  347.  
  348. ========================PASS========================
  349.  
  350.  
  351. TEST #9: Remove single branch using the Short Circuit algorithm
  352. [2] [3] [5] [6] [8] [9] [10] [11] [12] [13]
  353.  
  354. ========================PASS========================
  355.  
  356.  
  357. Test #10: Remove two branch node promoting a leaf node
  358. [2] [3] [5] [6] [8] [9] [11] [12] [13]
  359.  
  360. ========================PASS========================
  361.  
  362.  
  363. TEST #11: Remove two branch node promoting a 1 branch node using Short Circuit
  364. [2] [3] [5] [6] [8] [9] [12] [13]
  365.  
  366. ========================PASS========================
  367.  
  368.  
  369. TEST #12: Remove root with two branches
  370. [2] [3] [6] [8] [9] [12] [13]
  371.  
  372. ========================PASS========================
  373.  
  374.  
  375. TEST #13: Remove root with one branch
  376. [8] [9] [12] [13]
  377.  
  378. ========================PASS========================
  379.  
  380.  
  381. TEST #14: Remove root as leaf
  382.  
  383. ========================PASS========================
  384.  
  385.  
  386. TEST #15: Deep copy for a tree of 100 random values
  387.  
  388. ========================PASS========================
  389.  
  390.  
  391. TEST #16: Test deletion and Destructor
  392.  
  393. ========================PASS========================
  394.  
  395.  
  396. All Tests Passed.
  397. Don't forget to run with Valgrind and submit to Blackboard!
  398.  
  399. --30241-- REDIR: 0x56d3600 (libc.so.6:free) redirected to 0x4c29e20 (free)
  400. ==30241==
  401. ==30241== HEAP SUMMARY:
  402. ==30241== in use at exit: 1,760 bytes in 55 blocks
  403. ==30241== total heap usage: 1,236 allocs, 1,181 frees, 41,072 bytes allocated
  404. ==30241==
  405. ==30241== Searching for pointers to 55 not-freed blocks
  406. ==30241== Checked 186,024 bytes
  407. ==30241==
  408. ==30241== 192 bytes in 6 blocks are definitely lost in loss record 1 of 3
  409. ==30241== at 0x4C29180: operator new(unsigned long) (vg_replace_malloc.c:324)
  410. ==30241== by 0x402E42: BSTree::insert(int) (in /import/linux/home/wmclaug1/cs240/lab7/lab7)
  411. ==30241== by 0x401AFB: main (in /import/linux/home/wmclaug1/cs240/lab7/lab7)
  412. ==30241==
  413. ==30241== 384 bytes in 12 blocks are definitely lost in loss record 2 of 3
  414. ==30241== at 0x4C29180: operator new(unsigned long) (vg_replace_malloc.c:324)
  415. ==30241== by 0x402E42: BSTree::insert(int) (in /import/linux/home/wmclaug1/cs240/lab7/lab7)
  416. ==30241== by 0x4010D8: main (in /import/linux/home/wmclaug1/cs240/lab7/lab7)
  417. ==30241==
  418. ==30241== 1,184 bytes in 37 blocks are definitely lost in loss record 3 of 3
  419. ==30241== at 0x4C29180: operator new(unsigned long) (vg_replace_malloc.c:324)
  420. ==30241== by 0x402E42: BSTree::insert(int) (in /import/linux/home/wmclaug1/cs240/lab7/lab7)
  421. ==30241== by 0x40118C: main (in /import/linux/home/wmclaug1/cs240/lab7/lab7)
  422. ==30241==
  423. ==30241== LEAK SUMMARY:
  424. ==30241== definitely lost: 1,760 bytes in 55 blocks
  425. ==30241== indirectly lost: 0 bytes in 0 blocks
  426. ==30241== possibly lost: 0 bytes in 0 blocks
  427. ==30241== still reachable: 0 bytes in 0 blocks
  428. ==30241== suppressed: 0 bytes in 0 blocks
  429. ==30241==
  430. ==30241== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
  431. ==30241== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
  432. remote05:~/cs240/lab7> ls
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement