From: John Stone (johns_at_ks.uiuc.edu)
Date: Sun Oct 17 2010 - 15:52:47 CDT

Hi,
  I've fixed the leak that you and Axel found, and I can probably have
a fresh VMD build for Linux posted for you on biocore sometime tomorrow.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Sun, Oct 17, 2010 at 08:43:40PM +0200, TRINH Minh Hieu wrote:
> 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 A A A 1.129
> +++ ParseTree.C 17 Oct 2010 18:25:07 -0000
> @@ -595,6 +595,8 @@
> A A delete tmp;
> A A return NULL;
> A } else {
> + A A // avoid memory leak.
> + A A if (int_table) free(int_table);
> A A // if there isn't a list, then I have something like
> A A // mass + 5 < 7
> A A // 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,
>
> A A A MH Trinh
>
> ============================================
> A A M. TRINH Minh Hieu
> A A CEA, IBEB, SBTN/LIRM,
> A A TA(c)l : 04 66 79 19 44
> A A F-30207 Bagnols-sur-CA"ze, FRANCE
> ============================================

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078