[cfe-dev] aligned 'new'
Joerg Sonnenberger
joerg at britannica.bec.de
Sat Sep 3 10:29:44 PDT 2011
On Mon, May 30, 2011 at 07:49:28AM +0400, Anton Yartsev wrote:
> I am thinking of the ability of operator new to return memory aligned
> according to the alignment of the type passed to it (at least of AltiVec
> vector types whose proper alignment is essential).
Why do you need to change the language for that at all?
At least for UNIX-like systems, you could just use a call to
posix_memalign with your size,alignment pair and call the placement new
on the result. Wrap it around in one or two macros (instance vs array)
and it is done.
Joerg
More information about the cfe-dev
mailing list