The point of using posix_memalign is that is allows you to call free on the pointer returned while memalign does not.
James
Steven G. Parker wrote:
There is a call "memalign", which is probably much more common than posix_memalign (which I have never heard of before). It is not available on the mac either, but you might want to use that for everything else.
Steve
On Apr 8, 2007, at 9:55 PM, James Bigler wrote:
Your solution works fine if the alignment is 16 or less. It won't work for the general solution (like posix_memalign does).
It would be nice if there was some kind of assert that could make sure if someone did want something more it blows up here instead of somewhere else.
I'll go ahead and add one.
Also, I was trying to figure out a way that would allow the deallocation of a pointer that was moved around (like memalign or self coded one does). This would require some book keeping, though. posix_memalign pointers can be freed directly. I guess I can cook something up after the site visit.
James
Steven G. Parker wrote:
Thanks, solomon!
Steve
On Apr 6, 2007, at 1:04 PM, Solomon Boulos wrote:
Oh yeah, I forgot to commit this change. In any case, luckily on Mac OS X you don't need it (committed now)
On Apr 6, 2007, at 1:02 PM, Steven G. Parker wrote:
James, bad news - memalign is not available on OS/X...
Steve
Archive powered by MHonArc 2.6.16.