[webkit-dev] SquirrelFish Extreme for non x-86 platforms
Gavin Barraclough
barraclough at apple.com
Fri Dec 26 00:22:49 PST 2008
On Dec 25, 2008, at 3:51 AM, Oliver Hunt wrote:
> You can manually align the memory, eg.
> char* memory = malloc(size + alignment - 1);
> memory += alignment;
> memory &= ~(alignment - 1)
> return memory;
Oops, think you meant:
memory += (alignment - 1);
G.
> The obvious problem with this is that you can't directly free the
> result as it will not necessarily represent the start of the
> allocation, but there are mechanisms for working around that
> (storing the initial allocation address inline in the allocation
> itself for instance) but there are various trade offs involved.
>
> --Oliver
>
> On Dec 25, 2008, at 3:14 AM, Javed Rabbani wrote:
>
>> Oliver,
>>
>> 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.
>>
>>
>> Regards,
>> J R Shah
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20081226/2cd94cc9/attachment.html>
More information about the webkit-dev
mailing list