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

Maciej Stachowiak mjs at apple.com
Thu Dec 25 15:34:53 PST 2008


On Dec 25, 2008, at 3:54 AM, Oliver Hunt 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 :-/ )

All of the #if branches allocateBlock will guarantee 64k alignment,  
which is what is required. That's with the exception of the  
PLATFORM(SYMBIAN) branch, which appears to be incorrect. I would  
expect it to lead to crashes as a result of incorrect garbage  
collection.

Does anyone know if Symbian has an official way to get an aligned  
chunk of memory?

Regards,
Maciej


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


More information about the webkit-dev mailing list