[haiku-development] Help with memory allocation in WebKit JavaScriptCore

  • From: "Ryan Leavengood" <leavengood@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 15 Aug 2007 23:20:17 -0400

As most of you already know I'm working on porting WebKit to Haiku.
I'm currently trying to compile one of the bigger parts of
JavaScriptCore, kjs. One file is giving me problems, collector.cpp,
the garbage collector.

The main problem I'm having is with the memory allocation method.
Basically what seems to be needed is a way to allocate memory in a
nice aligned chunk. One way to do this is with the function
posix_memalign:

http://www.opengroup.org/onlinepubs/000095399/functions/posix_memalign.html

Haiku doesn't seem to implement this. The relevant bit of code is here:

http://pastie.caboo.se/88124

If any of you kernel gurus could recommend a way of implementing this
in Haiku I would appreciate it. Memory allocation is not yet an area I
know much about.

Regards,
Ryan

Other related posts: