[Gambas-user] Pre-release of Gambas 3.4.1

Benoît Minisini gambas at ...1...
Sat Apr 6 18:18:26 CEST 2013


Le 06/04/2013 17:06, Ron a écrit :
> Revision #5598 and #5600 made Gambas3 stable.
>
> But one thing I noticed it when it runs for a few days and I stop it i see this:
>
> gbx3: warning: 35 allocation(s) non freed.
> How can I check what they are?
> Run valgrind?
>
> Regards,
> Ron_2nd.

This is a memory leak in the interpreter or a component detected by the 
interpreter.

Alas valgrind won't help there.

It's the most difficult bug to fix.

The most important is trying to reproduce it reliably. If you can, then 
just explain me how. But I guess you won't be able, so let's go the hard 
way: recompiling the interpreter by enabling memory allocation debugging.

To do that, edit the /share/gb_alloc.h file at line 29 to replace 
"#define DEBUG_MEMORY 0" by "#define DEBUG_MEMORY 1".

Then recompile and install the interpreter.

Then run your project: all allocation routines will generate a trace on 
the standard error output. To put them in a file, run your project that way:

$ cd /path/to/DomotiGa
$ gbx3 > gbx.out 2>&1

Then wait until you stop the program and get the non-freed allocation 
warning, and send me the 'gbx.out' file. Beware that it may be big!

Regards,

-- 
Benoît Minisini




More information about the User mailing list