[gmx-developers] freeing nbnxn_atomdata_t array

Mirabzadeh, Christopher (mira2978@vandals.uidaho.edu) mira2978 at vandals.uidaho.edu
Wed Jun 10 19:23:22 CEST 2015


I’m not sure what file you are editing but I’ll attempt an answer at this. What I’ve noticed is that there is a Gromacs wrapper for free() called “sfree()”. I can’t recall where I’ve found it defined but I’ve used it in my own code to free memory allocated for arrays. What you may find is that the array is either freed in the .c file that you are editing, or you may find that it is freed where it is initialized, if a pointer. In my own project, the arrays that I am taking advantage of are defined and freed in src/gromacs/gmxlib/typedefs.c.

If the file you are editing is a .cpp, the garbage collection may be automatic, but that depends on the structure type.

I hope that helps!

Cheers,

-ChrisM

Mirabzadeh, Christopher
Research Assistant/Physics Instructor
Department of Physics
University of Idaho
Moscow, Id
(509)339-5647



On Jun 9, 2015, at 3:26 PM, Sikandar Mashayak <mashayak at votca.org<mailto:mashayak at votca.org>> wrote:

Hi,

I am trying to find out the location in the source code where the arrays, e..g, real *x, of the structure nbnxn_atomdata_t are freed? Are they freed explicitly or they are automatically deallocated when the program ends.

Thanks,
Sikandar
--
Gromacs Developers mailing list

* Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers or send a mail to gmx-developers-request at gromacs.org<mailto:gmx-developers-request at gromacs.org>.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20150610/c8dc893c/attachment.html>


More information about the gromacs.org_gmx-developers mailing list