Thread-topic: [apple scitech] posix_memalign on PowerPC?
> > > Indeed, we just had to find a replacement for _posix_memalign
> > > MSVC
> > > ... now it looks like we need a replacement here too!
> > >
> > > Please tell me what equivalent function your platform has (hint,
> > on
> > > windows it was called _aligned_malloc).
> > I'm helping a PowerPC G5 user and a Linux developer port a science
> > package (Eigen) to Mac. This works fine for me on Leopard/Intel,
> > doesn't work for the G5 user.
> > Is _posix_memalign not defined for PowerPC, or is it another
> > Thanks,
> > -Geoff
> > _______________________________________________
> Hi Geoff,
> posix_memalign is not necessary in OSX.
> >From some alloc.c code I stumbled across:
> #elif defined(__APPLE__)
> * malloc in Mac OS X guarantees 16 byte alignment. And large
> * memory allocations are guaranteed to be page-aligned. See
> * ManagingMemory/Articles/MemoryAlloc.html
> * --
> * ekato Jan 23 2006
> if (sizeof(ScmCell) <= 16)
> p = malloc(size);
> PLAIN_ERR("cannot ensure memory alignment");
> As noted in the comments above and the developer info, OSX
> guarantees 16 byte alignment. So, you'll have to find some
> way add in the code that sets this in the Eigen code.
> Ian Kaufman
> Research Systems Administrator
> Jacobs School of Engineering
Oh, and I forgot. Since it works on your Intel Mac, but not
on your PPC/G5 Mac, and it is coming from Linux code, you
may be running into an endianness issue.
Research Systems Administrator
Jacobs School of Engineering
Do not post admin requests to the list. They will be ignored.
Scitech mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden