[webkit-dev] SquirrelFish Extreme for non x-86 platforms

Javed Rabbani jrabbani at gmail.com
Thu Dec 25 03:14:55 PST 2008


Thanks a great deal for this explanation. I am considering running JS
SquirrelFish extreme engine on an ARM-based embedded platform. You are right
that posix systems should provide mmap or posix_memalign that will serve the
purpose. I am concerned about this issue because in my case, there is no
mmap, vm_map etc. to do the job. The only available option is to use
standard memory allocation routines. What is the way out for me to deal with
such a situation? Obviously, standard malloc() call from within fastMalloc()
is not doing anything good for me.

J R Shah

On Thu, Dec 25, 2008 at 3:54 PM, Oliver Hunt <oliver at apple.com> wrote:

> On Dec 25, 2008, at 2:18 AM, Javed Rabbani wrote:
> Oliver,
> <"That call to VirtualAlloc is inside a PLATFORM(WIN_OS) guard -- you
> should not be hitting it on a non-windows platform">
> You are absolutely right about that. The VirtualAlloc() should never be hit
> on non-Windows platform. Let me clarify, I am not hitting the VirtualAlloc
> call on a non-Windows platform. I was just referring to the point that what
> can be a possible alternative to VirtualAlloc on embedded platforms. Looking
> through the code, the VirtualAlloc is enabled for WIN_OS only as expected.
> For other platforms like SYMBIAN for example, the fastMalloc() is enabled
> with a comment that "VirtualAlloc is not available on Symbian, so hack with
> fastMalloc".
> It's perfectly possible it's broken in symbian -- the last symbian release
> was from more than two years ago.
> A bit of digging showed that Simon Hausmann added the SYMBIAN fastMalloc
> branch, which implies this was for WebKit/Qt which builds with fastMalloc
> disabled.  So that call to fastMalloc is actually just a call to standard
> system malloc, which i would guess, just by pure luck allocates adequately
> aligned memory.
> What are specific memory requirements that VirtualAlloc() fulfills and
> fastMalloc() does not? What can be the workaround for VirtualAlloc() on
> embedded platforms?
> Alignment -- VirtualAlloc, mmap, vm_map all produce page aligned memory
> (which is at least 4k aligned), and the posix_memalign version appears to
> actually over align memory (my following of the code makes me thinks it's
> requesting 64k alignment :-/ )
> I hope my point of concern is clearely stated now.
> I'm still not sure what your problem is -- posix systems should provide
> mmap or posix_memalign either of which will achieve correct behaviour
> --Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20081225/ade05078/attachment.html>

More information about the webkit-dev mailing list