This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/206] malloc does not align memory correctly for sse capable systems


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]