------- Comment #1 from brian at dessent dot net  2008-12-09 17:14 -------
Subject: Re:   New: aligned struct members in heap-allocated code

This is a dup of pr15795.  Basically, operator new is just a wrapper
around malloc from the libc, and malloc returns an allocation with a
fixed alignment (8 for x86 and 16 for x86_64 in the case of glibc.) 
There is no way to communicate any alignment requirement to malloc(), so
you'd have to override operator new to use posix_memalign() or something
in this case.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38455

Reply via email to