summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorNorbert Leser <norbert.leser@nokia.com>2009-08-20 09:34:40 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-08-20 09:34:40 (GMT)
commitac8dccabe25622de2672204e54e7c8610d14bce4 (patch)
treef06e8b47cca8c073f89ad1d0d2244f5ba5fcb0bf /src/3rdparty
parentacb0fdc3769f18e9c4c76abcb96a3a4d60afdb8b (diff)
downloadQt-ac8dccabe25622de2672204e54e7c8610d14bce4.zip
Qt-ac8dccabe25622de2672204e54e7c8610d14bce4.tar.gz
Qt-ac8dccabe25622de2672204e54e7c8610d14bce4.tar.bz2
Fix JavaScriptCore build on systems without anonymous mmapping
Use fastMalloc when neither MMAP nor VIRTUALALLOC are enabled RegisterFile constructor currently throws #error when both MMAP and VIRTUALALLOC conditions fail. On any platform that does not provide these features (for instance, Symbian), the fallback should be regular malloc (or fastMalloc). It is functionally equivalent in this case, even though it may have certain drawbacks such as lack of dynamic pre-allocation. Taken upstream from https://bugs.webkit.org/show_bug.cgi?id=27051 Reviewed-by: Simon Hausmann
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp
index cfcf1d3..06ddefc 100644
--- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp
@@ -38,7 +38,7 @@ RegisterFile::~RegisterFile()
#elif HAVE(VIRTUALALLOC)
VirtualFree(m_buffer, 0, MEM_RELEASE);
#else
- #error "Don't know how to release virtual memory on this platform."
+ fastFree(m_buffer);
#endif
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h
index d46bdc9..5a34d11 100644
--- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h
+++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h
@@ -204,8 +204,8 @@ namespace JSC {
CRASH();
}
m_commitEnd = reinterpret_cast<Register*>(reinterpret_cast<char*>(m_buffer) + committedSize);
- #else
- #error "Don't know how to reserve virtual memory on this platform."
+ #else // Neither MMAP nor VIRTUALALLOC - use fastMalloc instead
+ m_buffer = static_cast<Register*>(fastMalloc(bufferLength));
#endif
m_start = m_buffer + maxGlobals;
m_end = m_start;