[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory leaks when interacting with ROOT.

From: Jordi Gutiérrez Hermoso
Subject: Re: Memory leaks when interacting with ROOT.
Date: Sun, 1 Aug 2010 02:02:55 -0500

2010/7/22 Elias Salomão Helou Neto <address@hidden>:
> Hello, this is my first post.

Hi, welcome.

> Consider the following piece of code:
> //File
> #include <octave/oct.h>
> #include <root/TFile.h>
> DEFUN_DLD( memtest, args, , "Tests for memory leak." )
> {
>   return( octave_value() );
> }
> If I compile it using:
> mkoctfile $(root-config --libs --noauxlibs | sed s/-pthread// | sed
> s/-rdynamic//) -o memtest.oct
> and repeatedly run
> memtest; clear all;
> from octave's prompt, I can go from the starting 9MB footprint to
> several hundreds of megabytes and more.

Do you know how to use valgrind? Instead of trying to guess blindly at
what the problem is, we need, as Sherlock Holmes would say, "data,
data! I cannot make bricks without clay!"

If you don't know how to use valgrind, this looks like a gentle

Octave's default build system will compile in debug symbols, but I
don't know about ROOT's. You may need to recompile it in order to do
the same. Your own .oct file will also need debug symbols, and perhaps
you should write an m-script that calls the .oct file in order to
exhibit the memory leak.

Thanks for the help,
- Jordi G. H.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]