[webkit-dev] SquirrelFish Extreme for non x-86 platforms
oliver at apple.com
Thu Dec 25 03:51:39 PST 2008
You can manually align the memory, eg.
char* memory = malloc(size + alignment - 1);
memory += alignment;
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev