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: "bangerth at ices dot utexas dot edu" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 7 Jun 2004 14:30:24 -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 bangerth at ices dot utexas dot edu 2004-06-07 14:30 -------
Subject: Re: malloc does not align memory correctly for sse
capable systems
> One idea to fix it is to use special handling aligned() for C++ new.
Yes, but the C++ maintainers have already said that they don't want to do
that.
As an additional problem, one can overload operator new in an application
program, so you force writers of such overloads to reinvent the same
kludge again each time they write such functions. Think of cases like
template <typename T> class MyClass {
void * operator new (const size_t sz) {
// what to do here? we need to figure out the alignment requirements
// of T, but there is no standard conforming way to do this
}
};
Note also that in C++ you can only overload based on types, not on
alignment requirements, so figuring out the alignment really has to happen
inside above operator function.
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ices.utexas.edu
www: http://www.ices.utexas.edu/~bangerth/
--
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.