[Bug c++/59898] alignment problems in std::map with avx/avx2
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 23 09:07:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59898
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This unfortunately needs to be changed in the C++ standard, as long as the
operator new functions/methods that must be used and user can override with
their versions don't take the alignment as some parameter, there is no way to
find the alignment info and call say posix_memalign or memalign instead of
malloc under the hood. And, increasing the guaranteed alignment of malloc or
even just operator new unconditionally to the highest possible alignment of any
vector (right now 64-bytes for Skylake) would waste lots of memory for the
common case of programs that don't really need it.
More information about the Gcc-bugs
mailing list