Ignore:
Timestamp:
Apr 25, 2009, 1:44:47 AM (16 years ago)
Author:
[email protected]
Message:

2009-04-25 Jan Michael Alonzo <[email protected]>

Reviewed by Oliver Hunt.

Gtk build fix - check if we have MADV_FREE before using it.

  • interpreter/RegisterFile.cpp: (JSC::RegisterFile::releaseExcessCapacity):
  • wtf/Platform.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/interpreter/RegisterFile.cpp

    r42844 r42862  
    4848    void* memoryToRelease = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(reinterpret_cast<char*>(m_start) + commitSize * 2 - 1) & ~(commitSize - 1));
    4949    ptrdiff_t size = reinterpret_cast<char*>(m_end) - reinterpret_cast<char*>(memoryToRelease);
    50 #if HAVE(MMAP) && !HAVE(VIRTUALALLOC)
     50#if HAVE(MMAP) && HAVE(MADV_FREE) && !HAVE(VIRTUALALLOC)
    5151    while (madvise(memoryToRelease, size, MADV_FREE) == -1 && errno == EAGAIN) { }
    5252#elif HAVE(VIRTUALALLOC)
Note: See TracChangeset for help on using the changeset viewer.