diff options
author | Steve Block <steveblock@google.com> | 2009-10-08 17:19:54 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2009-10-20 00:41:58 +0100 |
commit | 231d4e3152a9c27a73b6ac7badbe6be673aa3ddf (patch) | |
tree | a6c7e2d6cd7bfa7011cc39abbb436142d7a4a7c8 /JavaScriptCore/interpreter/RegisterFile.h | |
parent | e196732677050bd463301566a68a643b6d14b907 (diff) | |
download | external_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.zip external_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.tar.gz external_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.tar.bz2 |
Merge webkit.org at R49305 : Automatic merge by git.
Change-Id: I8968561bc1bfd72b8923b7118d3728579c6dbcc7
Diffstat (limited to 'JavaScriptCore/interpreter/RegisterFile.h')
-rw-r--r-- | JavaScriptCore/interpreter/RegisterFile.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/JavaScriptCore/interpreter/RegisterFile.h b/JavaScriptCore/interpreter/RegisterFile.h index b5f7452..953c70f 100644 --- a/JavaScriptCore/interpreter/RegisterFile.h +++ b/JavaScriptCore/interpreter/RegisterFile.h @@ -204,8 +204,16 @@ 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 + /* + * If neither MMAP nor VIRTUALALLOC are available - use fastMalloc instead. + * + * Please note that this is the fallback case, which is non-optimal. + * If any possible, the platform should provide for a better memory + * allocation mechanism that allows for "lazy commit" or dynamic + * pre-allocation, similar to mmap or VirtualAlloc, to avoid waste of memory. + */ + m_buffer = static_cast<Register*>(fastMalloc(bufferLength)); #endif m_start = m_buffer + maxGlobals; m_end = m_start; |