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

Oliver Hunt oliver at apple.com
Thu Dec 25 02:54:10 PST 2008

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  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20081225/69284887/attachment.html>

More information about the webkit-dev mailing list