From: Rodrigo H. <kw...@ae...> - 2005-06-16 13:46:28
|
Thanks Danny, I guess I will have to join the masses building GCC 4.0 for MinGW, since I need the code to be cross-platform, and wasn't able to find a substitute for gcc 3.4.3 Linux. :) Danny Smith wrote: >// Override operator new with aligned version: >// (This requires gcc with mm_malloc support. Otherwise use the >aligned_malloc in mingw's malloc.h) >#include <mm_malloc.h> >inline void* operator new (std::size_t sz) >{ > // fixme: throw bad_alloc on error > void *p = (void *) _mm_malloc (sz, 16); > return p; >} > > |