Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Side by Side Diff: src/heap/mark-compact.cc

Issue 900793004: Correctly report some internal OOM conditions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/heap/store-buffer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compilation-cache.h" 10 #include "src/compilation-cache.h"
(...skipping 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after
2121 } 2121 }
2122 } 2122 }
2123 } 2123 }
2124 2124
2125 2125
2126 void MarkCompactCollector::EnsureMarkingDequeIsCommittedAndInitialize() { 2126 void MarkCompactCollector::EnsureMarkingDequeIsCommittedAndInitialize() {
2127 if (marking_deque_memory_ == NULL) { 2127 if (marking_deque_memory_ == NULL) {
2128 marking_deque_memory_ = new base::VirtualMemory(4 * MB); 2128 marking_deque_memory_ = new base::VirtualMemory(4 * MB);
2129 } 2129 }
2130 if (!marking_deque_memory_committed_) { 2130 if (!marking_deque_memory_committed_) {
2131 bool success = marking_deque_memory_->Commit( 2131 if (!marking_deque_memory_->Commit(
2132 reinterpret_cast<Address>(marking_deque_memory_->address()), 2132 reinterpret_cast<Address>(marking_deque_memory_->address()),
2133 marking_deque_memory_->size(), 2133 marking_deque_memory_->size(),
2134 false); // Not executable. 2134 false)) { // Not executable.
2135 CHECK(success); 2135 V8::FatalProcessOutOfMemory("EnsureMarkingDequeIsCommitted");
2136 }
2136 marking_deque_memory_committed_ = true; 2137 marking_deque_memory_committed_ = true;
2137 InitializeMarkingDeque(); 2138 InitializeMarkingDeque();
2138 } 2139 }
2139 } 2140 }
2140 2141
2141 2142
2142 void MarkCompactCollector::InitializeMarkingDeque() { 2143 void MarkCompactCollector::InitializeMarkingDeque() {
2143 if (marking_deque_memory_committed_) { 2144 if (marking_deque_memory_committed_) {
2144 Address addr = static_cast<Address>(marking_deque_memory_->address()); 2145 Address addr = static_cast<Address>(marking_deque_memory_->address());
2145 size_t size = marking_deque_memory_->size(); 2146 size_t size = marking_deque_memory_->size();
(...skipping 2260 matching lines...) Expand 10 before | Expand all | Expand 10 after
4406 SlotsBuffer* buffer = *buffer_address; 4407 SlotsBuffer* buffer = *buffer_address;
4407 while (buffer != NULL) { 4408 while (buffer != NULL) {
4408 SlotsBuffer* next_buffer = buffer->next(); 4409 SlotsBuffer* next_buffer = buffer->next();
4409 DeallocateBuffer(buffer); 4410 DeallocateBuffer(buffer);
4410 buffer = next_buffer; 4411 buffer = next_buffer;
4411 } 4412 }
4412 *buffer_address = NULL; 4413 *buffer_address = NULL;
4413 } 4414 }
4414 } 4415 }
4415 } // namespace v8::internal 4416 } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap/store-buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698