This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15795] No way to teach operator new anything about alignment requirements
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jun 2004 20:33:58 -0000
- Subject: [Bug c++/15795] No way to teach operator new anything about alignment requirements
- References: <20040603143635.15795.ma1flfs@bath.ac.uk>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jakub at gcc dot gnu dot org 2004-06-08 20:33 -------
Yeah, I was about to ask what other OSes do.
From
http://216.239.59.104/search?q=cache:itStYuxiBbQJ:www.ddj.com/dotnetbook/chapters/chapter15.pdf+malloc+alignment+SSE&hl=en&ie=UTF-8 and a bunch of other docs
google found me it seems MSFT is returning 8 byte aligned objects from malloc
like glibc and there are special interfaces for bigger alignment -
_aligned_malloc, _aligned_realloc, and _aligned_free (like posix_memalign in
POSIX). On Solaris for 32-bit programs things are also 8 byte aligned only,
eventhough there is an instruction which requires 64 byte alignment.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15795