Commit e8829099 authored by jmalonzo@webkit.org's avatar jmalonzo@webkit.org

2009-04-25 Jan Michael Alonzo <jmalonzo@webkit.org>

        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:

git-svn-id: svn://svn.chromium.org/blink/trunk@42862 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent dacfe7ad
2009-04-25 Jan Michael Alonzo <jmalonzo@webkit.org>
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:
2009-04-24 Kevin Ollivier <kevino@theolliviers.com>
wx build fix. Switching JSCore from a static lib to a dynamic lib
......@@ -47,7 +47,7 @@ void RegisterFile::releaseExcessCapacity()
m_maxUsed = m_start;
void* memoryToRelease = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(reinterpret_cast<char*>(m_start) + commitSize * 2 - 1) & ~(commitSize - 1));
ptrdiff_t size = reinterpret_cast<char*>(m_end) - reinterpret_cast<char*>(memoryToRelease);
#if HAVE(MMAP) && !HAVE(VIRTUALALLOC)
#if HAVE(MMAP) && HAVE(MADV_FREE) && !HAVE(VIRTUALALLOC)
while (madvise(memoryToRelease, size, MADV_FREE) == -1 && errno == EAGAIN) { }
#elif HAVE(VIRTUALALLOC)
VirtualFree(memoryToRelease, size, MEM_DECOMMIT);
......
......@@ -398,6 +398,10 @@
#endif
#if defined(MADV_FREE)
#define HAVE_MADV_FREE 1
#endif
/* ENABLE macro defaults */
/* fastMalloc match validation allows for runtime verification that
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment