Well, thanks for asking that question. It made me think. I guessed it might be a leak because the memory being utilised seemed to be increasing the longer I ran it, but in an unpredictable way.

However, Valgrind gives the following, but it doesn't particularly seem to depend on any segment of code:

==2576== LEAK SUMMARY: ==2576== definitely lost: 731,689 bytes in 54,909 blocks ==2576== indirectly lost: 68,896 bytes in 2,326 blocks ==2576== possibly lost: 37,769,458 bytes in 52,844 blocks ==2576== still reachable: 78,109,700 bytes in 547,738 blocks ==2576== suppressed: 0 bytes in 0 blocks ==2576== Reachable blocks (those to which a pointer was found) are not + shown. ==2576== To see them, rerun with: --leak-check=full --show-leak-kinds= +all ==2576== ==2576== For counts of detected and suppressed errors, rerun with: -v ==2576== ERROR SUMMARY: 2610 errors from 2610 contexts (suppressed: 1 +from 1) image@iExam_SD_0003:~/Documents/Endoscopia$

as it gives a similar dump to this even when I do ctrl-c immediately on start-up.

Regards

Steve


In reply to Re^2: Detecting memory leaks. by Steve_BZ
in thread Detecting memory leaks. by Steve_BZ

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.