Ignore:
Timestamp:
Nov 6, 2008, 10:38:41 AM (17 years ago)
Author:
Simon Hausmann
Message:

2008-11-06 Kristian Amlie <[email protected]>

Reviewed by Simon Hausmann.

Implemented the block allocation on Symbian through heap allocation.

Unfortunately there is no way to allocate virtual memory. The Posix
layer provides mmap() but no anonymous mapping. So this is a very slow
solution but it should work as a start.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/Collector.cpp

    r38178 r38181  
    190190    // FIXME: tag the region as a JavaScriptCore heap when we get a registered VM tag: <rdar://problem/6054788>.
    191191    vm_map(current_task(), &address, BLOCK_SIZE, BLOCK_OFFSET_MASK, VM_FLAGS_ANYWHERE, MEMORY_OBJECT_NULL, 0, FALSE, VM_PROT_DEFAULT, VM_PROT_DEFAULT, VM_INHERIT_DEFAULT);
     192#elif PLATFORM(SYMBIAN)
     193    // no memory map in symbian, need to hack with fastMalloc
     194    void* address = fastMalloc(BLOCK_SIZE);
     195    memset(reinterpret_cast<void*>(address), 0, BLOCK_SIZE);
    192196#elif PLATFORM(WIN_OS)
    193197     // windows virtual address granularity is naturally 64k
     
    232236#if PLATFORM(DARWIN)   
    233237    vm_deallocate(current_task(), reinterpret_cast<vm_address_t>(block), BLOCK_SIZE);
     238#elif PLATFORM(SYMBIAN)
     239    fastFree(block);
    234240#elif PLATFORM(WIN_OS)
    235241    VirtualFree(block, 0, MEM_RELEASE);
Note: See TracChangeset for help on using the changeset viewer.