[haiku-development] Re: Help with memory allocation in WebKitJavaScriptCore

  • From: "Ryan Leavengood" <leavengood@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 16 Aug 2007 11:56:36 -0400

Thanks for implementing posix_memalign guys, but there is still a small problem.

If you check the code again (http://pastie.caboo.se/88124) you will
see that a void * is passed to posix_memalign:

#elif HAVE(POSIX_MEMALIGN)
    void* address;
    posix_memalign(address, BLOCK_SIZE, BLOCK_SIZE);
    memset(reinterpret_cast<void*>(address), 0, BLOCK_SIZE);

But every description I've seen of posix_memalign has the first
parameter as a void **. So I'm a bit confused. To get it to compile I
had to change the first parameter to &address, which I guess is fine
to get things working, but I wonder how the other WebKit ports can use
the above code.

I'll have to ask the WebKit guys I guess.

Regards,,
Ryan

Other related posts: