[gmx-developers] Alingment & NULL pointers

David van der Spoel spoel at xray.bmc.uu.se
Fri Sep 4 11:57:41 CEST 2015


With the impending requirement of C++11 the use of NULL is deprecated 
(as I just found out). However we still are dependent on smalloc and 
friends to give us aligned memory for the inner loops, which means we 
have to deal with malloc and free for handling pointers.

The stackoverflow page below suggests a way of aligning std::vector 
under the hood, which would have the advantage that we could use 
std::vector without having to worry about memory management. Is that 
something we should consider?

http://stackoverflow.com/questions/8456236/how-is-a-vectors-data-aligned

-- 
David van der Spoel, Ph.D., Professor of Biology
Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone:	+46184714205.
spoel at xray.bmc.uu.se    http://folding.bmc.uu.se


More information about the gromacs.org_gmx-developers mailing list