
{"id":14244,"date":"2013-09-20T14:20:44","date_gmt":"2013-09-20T14:20:44","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=14244"},"modified":"2013-09-20T14:20:44","modified_gmt":"2013-09-20T14:20:44","slug":"detecting-memory-leaks-ii","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2013\/09\/20\/detecting-memory-leaks-ii\/","title":{"rendered":"Detecting Memory Leaks  II"},"content":{"rendered":"<h4><u>commandline session<\/u><\/h4>\n<pre>\n$gcc -g -ansi -pedantic -W -Wall algorithm.c\nalgorithm.c: In function \u2018main\u2019:\nalgorithm.c:47:5: warning: unused variable \u2018value\u2019 [-Wunused-variable]\nalgorithm.c:36:7: warning: unused variable \u2018p\u2019 [-Wunused-variable]\nalgorithm.c:35:5: warning: unused variable \u2018i\u2019 [-Wunused-variable]\nalgorithm.c:34:14: warning: unused parameter \u2018argc\u2019 [-Wunused-parameter]\nalgorithm.c:34:26: warning: unused parameter \u2018argv\u2019 [-Wunused-parameter]\n$valgrind --tool=memcheck --leak-check=full .\/a.out\n==23555== Memcheck, a memory error detector\n==23555== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.\n==23555== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info\n==23555== Command: .\/a.out\n==23555==\nfound in: htop-0.9\nfound in: .\n==23555==\n==23555== HEAP SUMMARY:\n==23555==     in use at exit: 0 bytes in 0 blocks\n==23555==   total heap usage: 74 allocs, 74 frees, 45,235 bytes allocated\n==23555==\n==23555== All heap blocks were freed -- no leaks are possible\n==23555==\n==23555== For counts of detected and suppressed errors, rerun with: -v\n==23555== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)\n$\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>commandline session $gcc -g -ansi -pedantic -W -Wall algorithm.c algorithm.c: In function \u2018main\u2019: algorithm.c:47:5: warning: unused variable \u2018value\u2019 [-Wunused-variable] algorithm.c:36:7: warning: unused variable \u2018p\u2019 [-Wunused-variable] algorithm.c:35:5: warning: unused variable \u2018i\u2019 [-Wunused-variable] algorithm.c:34:14: warning: unused parameter \u2018argc\u2019 [-Wunused-parameter] algorithm.c:34:26: warning: unused parameter \u2018argv\u2019 [-Wunused-parameter] $valgrind &#8211;tool=memcheck &#8211;leak-check=full .\/a.out ==23555== Memcheck, a memory error detector ==23555== Copyright &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2013\/09\/20\/detecting-memory-leaks-ii\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Detecting Memory Leaks  II&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83],"tags":[390,891,1014,1108],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/14244"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=14244"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/14244\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=14244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=14244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=14244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}