On 08/22/2012 03:30 PM, Andy Buckle wrote: >> On Wed, 2012-08-22 at 12:21 +0100, Andy Buckle wrote: >>> On 22 August 2012 12:11, dirk<dirkmay...@comcast.net> wrote: >>>> Hello all - >>>> I'm trying to learn valgrind for oct files... can anyone share a working >>>> example I could study? >>>> Hope so, thanks >>>> - dirk >>> >>> Invoke octave from the command line of your OS, in a way that calls >>> your oct-file function. Run the whole of octave through valgrind. You >>> will probably want to generate suppressions by doing this and not >>> calling your oct-file. >>> >>> In the past i have also used pre-processor to change around the code, >>> so i can call parts of my code from the OS, instead of from Octave. >>> This is much faster than running the whole of Octave through valgrind. >>> >>> Which bit do you want examples of? > > On 22 August 2012 20:58, dirk<dirkmay...@comcast.net> wrote: >> thanks for the tips Andy. >> I suspect my issues are just newbie problems, so any& all advice is >> helpful. Here's an example point of confusion: >> >> $ valgrind octave --eval exit&> octave_grind.txt >> >> gets me this in the .txt: >> >> ==17994== LEAK SUMMARY: >> ==17994== definitely lost: 3,108 bytes in 116 blocks >> ==17994== indirectly lost: 27,994 bytes in 201 blocks >> ==17994== possibly lost: 659,439 bytes in 3,101 blocks >> ==17994== still reachable: 34,585,196 bytes in 6,407 blocks >> ==17994== suppressed: 0 bytes in 0 blocks >> >> which seems to be telling that I lose 3k by just starting and stopping >> octave... hard to believe. >> >> If it matters, I'm running octave 3.4.2 under linux, installed via >> apt-get. >> >> - dirk > > (ooops, I forgot to reply-all) > > It's common to see that. I get the same kind of thing. It is probably > Octave (or the libraries it depends on).
The version with the bundle I'm using (Fedora 14...they are past that now) is also 3.4.2. I had problems with it crashing after just a few operations. I ran the valgrind command you list above and get: ==5329== LEAK SUMMARY: ==5329== definitely lost: 268 bytes in 19 blocks ==5329== indirectly lost: 0 bytes in 0 blocks ==5329== possibly lost: 102,948 bytes in 2,490 blocks ==5329== still reachable: 1,848,332 bytes in 5,439 blocks ==5329== suppressed: 0 bytes in 0 blocks Could be Octave. Could be maintainers using out-of-date library. Hard to tell. In any case, the latest Octave in the repository comes out with 0 bytes lost for the same test. Dan ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev