Changeset 48558 in webkit


Ignore:
Timestamp:
Sep 19, 2009 10:41:44 AM (15 years ago)
Author:
Simon Hausmann
Message:

QtWebKit Windows CE compile fix

Patch by Joerg Bornemann <joerg.bornemann@nokia.com> on 2009-09-19
Reviewed by George Staikos.

https://bugs.webkit.org/show_bug.cgi?id=29379

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.

  • runtime/Collector.cpp:

(JSC::Heap::allocateBlock):
(JSC::Heap::freeBlock):

  • runtime/Collector.h:
Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r48557 r48558  
     12009-09-19  Joerg Bornemann  <joerg.bornemann@nokia.com>
     2
     3        Reviewed by George Staikos.
     4
     5        QtWebKit Windows CE compile fix
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=29379
     8
     9        There is no _aligned_alloc or _aligned_free on Windows CE.
     10        We just use the Windows code that was there before and use VirtualAlloc.
     11        But that also means that the BLOCK_SIZE must be 64K as this function
     12        allocates on 64K boundaries.
     13
     14        * runtime/Collector.cpp:
     15        (JSC::Heap::allocateBlock):
     16        (JSC::Heap::freeBlock):
     17        * runtime/Collector.h:
     18
    1192009-09-19  Oliver Hunt  <oliver@apple.com>
    220
  • trunk/JavaScriptCore/runtime/Collector.cpp

    r48391 r48558  
    237237
    238238    memset(reinterpret_cast<void*>(address), 0, BLOCK_SIZE);
     239#elif PLATFORM(WINCE)
     240    void* address = VirtualAlloc(NULL, BLOCK_SIZE, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
    239241#elif PLATFORM(WIN_OS)
    240242#if COMPILER(MINGW)
     
    319321#elif PLATFORM(SYMBIAN)
    320322    userChunk->Free(reinterpret_cast<TAny*>(block));
     323#elif PLATFORM(WINCE)
     324    VirtualFree(block, 0, MEM_RELEASE);
    321325#elif PLATFORM(WIN_OS)
    322326#if COMPILER(MINGW)
  • trunk/JavaScriptCore/runtime/Collector.h

    r47799 r48558  
    182182    template<> struct CellSize<sizeof(uint64_t)> { static const size_t m_value = 64; };
    183183
     184#if PLATFORM(WINCE)
     185    const size_t BLOCK_SIZE = 64 * 1024; // 64k
     186#else
    184187    const size_t BLOCK_SIZE = 64 * 4096; // 256k
     188#endif
    185189
    186190    // derived constants
Note: See TracChangeset for help on using the changeset viewer.