GLH_build() Memory Leak

SCHNAaP/SCHNArP and CEHS for double helices

Moderator: xiangjun

GLH_build() Memory Leak

Postby clarebonk » Fri May 15, 2009 9:11 pm

I took out the printf()s from GLH_build() and hard coded the user-response values that I want, so that I do not have to enter them in every time I run the function. When I call GLH_build() in a loop, my memory usage increases with each iteration. I assume this behavior is not wanted. There seems to be a memory leak somewhere. I tried looking through the code to make sure the mallocs are all freed, but I have not found any red flags. Any idea why/where this is happening?

Thanks!
clarebonk
 
Posts: 9
Joined: Wed Mar 11, 2009 6:59 pm

Re: GLH_build() Memory Leak

Postby xiangjun » Fri May 15, 2009 11:24 pm

Thanks for reporting the problems you experienced. Could you please be more specific, and better yet, providing me a reproducible example? I will certainly look into it to get it fixed ASAP.

Xiang-Jun
Xiang-Jun Lu[律祥俊](3dna.lu@gmail.com), Creator & Maintainer of 3DNA
Blog: http://xiang-jun.blogspot.com/
[http://3dna.rutgers.edu/ -- the new official 3DNA homepage for v2.0]
xiangjun
Site Admin
 
Posts: 129
Joined: Thu Aug 10, 2006 2:18 am

Re: GLH_build() Memory Leak

Postby clarebonk » Fri May 22, 2009 1:14 am

Xiang-jun, I just sent you an e-mail with an example. I hope this helps. Thanks so much. I'm calling GLH_build an insane number of times, which is the only reason this matters. But, I'm getting good results! It is a great software suite.
clarebonk
 
Posts: 9
Joined: Wed Mar 11, 2009 6:59 pm

Re: GLH_build() Memory Leak

Postby xiangjun » Mon Jun 01, 2009 7:00 pm

I have fixed the memory leak bugs in file rebuild.c. I have also taken this opportunity to tidy up the code base a little bit. Please download the updated version and verify that the bugs are indeed gone.

Thanks,

Xiang-Jun
Xiang-Jun Lu[律祥俊](3dna.lu@gmail.com), Creator & Maintainer of 3DNA
Blog: http://xiang-jun.blogspot.com/
[http://3dna.rutgers.edu/ -- the new official 3DNA homepage for v2.0]
xiangjun
Site Admin
 
Posts: 129
Joined: Thu Aug 10, 2006 2:18 am

Re: GLH_build() Memory Leak

Postby clarebonk » Wed Jun 03, 2009 9:55 pm

It took me awhile to incorporate the new code into my code and to perform regression testing, but it is working perfectly. No memory leak! Thanks Xiang-Jun!!
clarebonk
 
Posts: 9
Joined: Wed Mar 11, 2009 6:59 pm


Return to SCHNAaP/SCHNArP

Who is online

Users browsing this forum: No registered users and 1 guest