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

Side by Side Diff: src/heap/spaces-inl.h

Issue 1376413005: Revert of [heap] Prepare code for smaller large object allocation limit than max allocatable memory. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « src/heap/spaces.h ('k') | src/hydrogen.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 #ifndef V8_HEAP_SPACES_INL_H_ 5 #ifndef V8_HEAP_SPACES_INL_H_
6 #define V8_HEAP_SPACES_INL_H_ 6 #define V8_HEAP_SPACES_INL_H_
7 7
8 #include "src/heap/spaces.h" 8 #include "src/heap/spaces.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/msan.h" 10 #include "src/msan.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 181 }
182 182
183 183
184 // -------------------------------------------------------------------------- 184 // --------------------------------------------------------------------------
185 // PagedSpace 185 // PagedSpace
186 186
187 Page* Page::Initialize(Heap* heap, MemoryChunk* chunk, Executability executable, 187 Page* Page::Initialize(Heap* heap, MemoryChunk* chunk, Executability executable,
188 PagedSpace* owner) { 188 PagedSpace* owner) {
189 Page* page = reinterpret_cast<Page*>(chunk); 189 Page* page = reinterpret_cast<Page*>(chunk);
190 page->mutex_ = new base::Mutex(); 190 page->mutex_ = new base::Mutex();
191 DCHECK(page->area_size() <= kAllocatableMemory); 191 DCHECK(page->area_size() <= kMaxRegularHeapObjectSize);
192 DCHECK(chunk->owner() == owner); 192 DCHECK(chunk->owner() == owner);
193 owner->IncreaseCapacity(page->area_size()); 193 owner->IncreaseCapacity(page->area_size());
194 owner->Free(page->area_start(), page->area_size()); 194 owner->Free(page->area_start(), page->area_size());
195 195
196 heap->incremental_marking()->SetOldSpacePageFlags(chunk); 196 heap->incremental_marking()->SetOldSpacePageFlags(chunk);
197 197
198 return page; 198 return page;
199 } 199 }
200 200
201 201
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 484
485 485
486 intptr_t LargeObjectSpace::Available() { 486 intptr_t LargeObjectSpace::Available() {
487 return ObjectSizeFor(heap()->isolate()->memory_allocator()->Available()); 487 return ObjectSizeFor(heap()->isolate()->memory_allocator()->Available());
488 } 488 }
489 489
490 } // namespace internal 490 } // namespace internal
491 } // namespace v8 491 } // namespace v8
492 492
493 #endif // V8_HEAP_SPACES_INL_H_ 493 #endif // V8_HEAP_SPACES_INL_H_
OLDNEW
« no previous file with comments | « src/heap/spaces.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698