summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2009-09-18 12:01:38 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2009-09-18 13:59:38 (GMT)
commita2e914538f651aab9638512a327a31718a8da53e (patch)
treeb0e810b8f4c2f0b99b973bec940c492cfdaa716e /src/3rdparty/webkit
parentc23ad8747cde25fa3c56d0d0e46b21d15ee3a05d (diff)
downloadQt-a2e914538f651aab9638512a327a31718a8da53e.zip
Qt-a2e914538f651aab9638512a327a31718a8da53e.tar.gz
Qt-a2e914538f651aab9638512a327a31718a8da53e.tar.bz2
QtWebKit Windows CE compile fix
There is no _aligned_alloc or _aligned_free on Windows CE. We just use the Windows code that was there before and use VirtualAlloc. But that also means that the BLOCK_SIZE must be 64K as this function allocates on 64K boundaries. Reviewed-by: Simon Hausmann
Diffstat (limited to 'src/3rdparty/webkit')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp4
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp
index 9fac2e3..c02744c 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp
@@ -252,6 +252,8 @@ NEVER_INLINE CollectorBlock* Heap::allocateBlock()
uintptr_t address = reinterpret_cast<uintptr_t>(mask);
memset(reinterpret_cast<void*>(address), 0, BLOCK_SIZE);
+#elif PLATFORM(WINCE)
+ void* address = VirtualAlloc(NULL, BLOCK_SIZE, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
#elif PLATFORM(WIN_OS)
#if COMPILER(MINGW)
void* address = __mingw_aligned_malloc(BLOCK_SIZE, BLOCK_SIZE);
@@ -334,6 +336,8 @@ NEVER_INLINE void Heap::freeBlock(CollectorBlock* block)
vm_deallocate(current_task(), reinterpret_cast<vm_address_t>(block), BLOCK_SIZE);
#elif PLATFORM(SYMBIAN)
userChunk->Free(reinterpret_cast<TAny*>(block));
+#elif PLATFORM(WINCE)
+ VirtualFree(block, 0, MEM_RELEASE);
#elif PLATFORM(WIN_OS)
#if COMPILER(MINGW)
__mingw_aligned_free(block);
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h
index 2dc3264..1a55bb5 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.h
@@ -181,7 +181,11 @@ namespace JSC {
#endif
template<> struct CellSize<sizeof(uint64_t)> { static const size_t m_value = 64; };
+#if PLATFORM(WINCE)
+ const size_t BLOCK_SIZE = 64 * 1024; // 64k
+#else
const size_t BLOCK_SIZE = 64 * 4096; // 256k
+#endif
// derived constants
const size_t BLOCK_OFFSET_MASK = BLOCK_SIZE - 1;