From: TRINH Minh Hieu (mhtrinh_at_gmail.com)
Date: Sun Oct 17 2010 - 13:43:40 CDT

On Sun, Oct 17, 2010 at 8:29 PM, Axel Kohlmeyer <akohlmey_at_gmail.com> wrote:

> On Sat, Oct 16, 2010 at 9:11 PM, TRINH Minh Hieu <mhtrinh_at_gmail.com>
> wrote:
> >
> > Hi,
>
> hi,
>
> thanks for the concise report with a simple example to reproduce it.
>
> > I think I found a memory leak with the command : mol modselect when using
> > index (or serial)
> > I'm currently using vmd-1.8.7
> >
> > To reproduce the bug :
> > - Load a pdb file
> > - In console, run :
> >
> > for {set i 0} {$i <= 5000} {incr i} {mol modselect 0 0 "index = 10"}
> >
> > - Each time the previous command is ran, the memory usage by vmd increase
> (I
> > use "top" to see this)
>
> confirmed! i ran this with valgrind and could also locate the origin
> of the memory leak. the straightforward change to avoid this leak
> is the following patch:
>
> Index: ParseTree.C
> ===================================================================
> RCS file: /vmd/cvsroot/vmd/src/ParseTree.C,v
> retrieving revision 1.129
> diff -u -r1.129 ParseTree.C
> --- ParseTree.C 10 Nov 2009 22:21:24 -0000 1.129
> +++ ParseTree.C 17 Oct 2010 18:25:07 -0000
> @@ -595,6 +595,8 @@
> delete tmp;
> return NULL;
> } else {
> + // avoid memory leak.
> + if (int_table) free(int_table);
> // if there isn't a list, then I have something like
> // mass + 5 < 7
> // so just return the data
>
>
> > Normally, I guess that nobody use that much the "mol modselect" command
> ...
> > In my case, I'm making movie with vmd so I run a lot of "mol modselect"
> > (almost one per frame)
>
> how urgently do you need a corrected VMD binary?
> and for which platform?
>

Thank you for your fast reply.
I need my movie to be done for the end of this week so ... the faster the
better :-p. It will prevent me from restarting vmd every 10 minutes ...

I'm using Linux x86_64, more precisely :
$ uname -a
Linux sbtn155 2.6.35-ARCH #1 SMP PREEMPT Wed Sep 29 08:45:18 CEST 2010
x86_64 Intel(R) Xeon(R) CPU 5150 @ 2.66GHz GenuineIntel GNU/Linux

Cheers,

    MH Trinh

============================================
   M. TRINH Minh Hieu
   CEA, IBEB, SBTN/LIRM,
   Tél : 04 66 79 19 44
   F-30207 Bagnols-sur-Cèze, FRANCE
============================================