[webkit-dev] SquirrelFish Extreme for non x-86 platforms
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);
> 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.
> On Dec 25, 2008, at 3:14 AM, Javed Rabbani wrote:
>> 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
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev