diff options
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h index 933efb9..3a6e63b 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h @@ -176,23 +176,31 @@ namespace JSC { #if HAVE(MMAP) m_buffer = static_cast<Register*>(mmap(0, bufferLength, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, VM_TAG_FOR_REGISTERFILE_MEMORY, 0)); if (m_buffer == MAP_FAILED) { +#if PLATFORM(WINCE) + fprintf(stderr, "Could not allocate register file: %d\n", GetLastError()); +#else fprintf(stderr, "Could not allocate register file: %d\n", errno); +#endif CRASH(); } #elif HAVE(VIRTUALALLOC) m_buffer = static_cast<Register*>(VirtualAlloc(0, roundUpAllocationSize(bufferLength, commitSize), MEM_RESERVE, PAGE_READWRITE)); if (!m_buffer) { - #if !PLATFORM(WIN_CE) +#if PLATFORM(WINCE) + fprintf(stderr, "Could not allocate register file: %d\n", GetLastError()); +#else fprintf(stderr, "Could not allocate register file: %d\n", errno); - #endif +#endif CRASH(); } size_t committedSize = roundUpAllocationSize(maxGlobals * sizeof(Register), commitSize); void* commitCheck = VirtualAlloc(m_buffer, committedSize, MEM_COMMIT, PAGE_READWRITE); if (commitCheck != m_buffer) { - #if !PLATFORM(WIN_CE) +#if PLATFORM(WINCE) + fprintf(stderr, "Could not allocate register file: %d\n", GetLastError()); +#else fprintf(stderr, "Could not allocate register file: %d\n", errno); - #endif +#endif CRASH(); } m_commitEnd = reinterpret_cast<Register*>(reinterpret_cast<char*>(m_buffer) + committedSize); @@ -226,7 +234,9 @@ namespace JSC { if (newEnd > m_commitEnd) { size_t size = roundUpAllocationSize(reinterpret_cast<char*>(newEnd) - reinterpret_cast<char*>(m_commitEnd), commitSize); if (!VirtualAlloc(m_commitEnd, size, MEM_COMMIT, PAGE_READWRITE)) { -#if !PLATFORM(WIN_CE) +#if PLATFORM(WINCE) + fprintf(stderr, "Could not allocate register file: %d\n", GetLastError()); +#else fprintf(stderr, "Could not allocate register file: %d\n", errno); #endif CRASH(); |