Ignore:
Timestamp:
Jun 19, 2008, 11:18:30 AM (17 years ago)
Author:
[email protected]
Message:

Build fix.

  • kjs/collector.cpp: (KJS::Heap::Heap): (KJS::allocateBlock):
  • kjs/collector.h: No, #if PLATFORM(UNIX) was not right. I've just moved the unsafe initialization back for now, as the platforms that use that code path do not use multiple threads yet.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/collector.cpp

    r34660 r34661  
    9191    : mainThreadOnlyObjectCount(0)
    9292    , m_markListSet(0)
    93 #if PLATFORM(UNIX)
    94     , m_pagesize(getpagesize())
    95 #endif
    9693{
    9794    memset(&primaryHeap, 0, sizeof(CollectorHeap));
     
    112109    memset(address, 0, BLOCK_SIZE);
    113110#else
    114    
     111
     112#if USE(MULTIPLE_THREADS)
     113#error Need to initialize pagesize safely.
     114#endif
     115    static size_t pagesize = getpagesize();
     116
    115117    size_t extra = 0;
    116     if (BLOCK_SIZE > m_pagesize)
    117         extra = BLOCK_SIZE - m_pagesize;
     118    if (BLOCK_SIZE > pagesize)
     119        extra = BLOCK_SIZE - pagesize;
    118120
    119121    void* mmapResult = mmap(NULL, BLOCK_SIZE + extra, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
Note: See TracChangeset for help on using the changeset viewer.