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". What are specific memory requirements that VirtualAlloc() fulfills and fastMalloc() does not? What can be the workaround for VirtualAlloc() on embedded platforms? I hope my point of concern is clearely stated now. Regards, J R Shah On Thu, Dec 25, 2008 at 2:07 PM, Oliver Hunt <oli...@apple.com> wrote: > > On Dec 25, 2008, at 12:54 AM, Javed Rabbani wrote: > > This way the engine will run without JIT support. However, what to do with >> memory allocation functions like VirtualAlloc() that are only available on >> Windows? I mean to say, to run on embedded platforms, what alternate has to >> exist that may provide the facility of VirtualAlloc(). As far I have seen, >> the virtualAlloc() calls can be disabled even on Windows by setting >> HAVE_VIRTUAL_ALLOC to 0 in JSC/wtf/Platform.h. However, the garbage >> collection implementation uses this particular call inside >> JSC/runtime/Collector.cpp irrespective of HAVE_VIRTUAL_ALLOC being 0 or 1. >> Any suggestions on this front? >> > > That call to VirtualAlloc is inside a PLATFORM(WIN_OS) guard -- you should > not be hitting it on a non-windows platform > > I have built Windows port with HAVE_VIRTUAL_ALLOC set to 0. But the >> VirtualAlloc() call inside JSC/runtime/Collector.cpp if replaced with >> fastMalloc() causes the WebKit to crash even on Windows. >> > > This is basically expected -- as the code for other platforms should have > also indicated the collector has important alignment requirements that > fastMalloc does not guarantee. > > I think to fix your issues you should work out why your platform is being > reported as windows (PLATFORM(WIN_OS)) > > --Oliver > >
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev