[gmx-developers] md->nalloc initialization
David van der Spoel
spoel at xray.bmc.uu.se
Fri Feb 13 06:40:58 CET 2009
qkli at iccas.ac.cn wrote:
> Dear Gmx-developers,
>
> When I read the codes, I found the md->nalloc (void atoms2md(...) in mdatoms.c)
> is not properly initialized(t_mdatoms *init_mdatoms(...)) before being used in comparison
> if (md->nr > md->nalloc)
> even though the default behavior of some compilers may set it to zero,
> but it's not always true.
>
> I hope I'm wrong!
The memory allocation in
snew(md,1)
in routine init_mdatoms sets the content of the structure to zero,
including nalloc. No worries here, but we appreciate people critically
inspecting the code, thanks for that.
>
> Qikai Li
> ICCAS
> ----
> 2009-2-13
>
>
>
> _______________________________________________
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-developers-request at gromacs.org.
--
David van der Spoel, Ph.D., Professor of Biology
Molec. Biophys. group, Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone: +46184714205. Fax: +4618511755.
spoel at xray.bmc.uu.se spoel at gromacs.org http://folding.bmc.uu.se
More information about the gromacs.org_gmx-developers
mailing list