This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/206] malloc does not align memory correctly for sse capable systems
- From: "jakub at redhat dot com" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 8 Jun 2004 15:03:00 -0000
- Subject: [Bug libc/206] malloc does not align memory correctly for sse capable systems
- References: <20040605142238.206.ma1flfs@bath.ac.uk>
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
------- Additional Comments From jakub at redhat dot com 2004-06-08 15:02 -------
MALLOC_ALIGNMENT in glibc is really not going to change, it is a quality of
implementation, sure, by making it bigger the quality implementation would drop
a lot for most of the programs out there.
SSE types are certainly out of the scope of the C standard. GCC allows to create
objects with arbitrary alignment, not just __m128, but you can use say:
__attribute__((aligned (256))). With the same argumentation, you could request
that all malloc memory is 256 bytes aligned (or 4K or whatever you choose).
If you want to make C++ new working on these types, the compiler will simply
need to do its part and call some (non-standard) new operator with additional
alignment argument, which would in turn call posix_memalign, perhaps guarded with
some compiler option which will otherwise result in a compile time error if new
is used on types with too big alignment requirement.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
http://sources.redhat.com/bugzilla/show_bug.cgi?id=206
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.