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

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

Issue 1244353002: Use a lock in pages to synchronize sweeper threads to allow others to wait on concurrently swept pa… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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.cc ('k') | 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 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/heap-profiler.h" 9 #include "src/heap-profiler.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 136
137 #endif 137 #endif
138 138
139 139
140 // -------------------------------------------------------------------------- 140 // --------------------------------------------------------------------------
141 // PagedSpace 141 // PagedSpace
142 Page* Page::Initialize(Heap* heap, MemoryChunk* chunk, Executability executable, 142 Page* Page::Initialize(Heap* heap, MemoryChunk* chunk, Executability executable,
143 PagedSpace* owner) { 143 PagedSpace* owner) {
144 Page* page = reinterpret_cast<Page*>(chunk); 144 Page* page = reinterpret_cast<Page*>(chunk);
145 page->mutex_ = new base::Mutex();
145 DCHECK(page->area_size() <= kMaxRegularHeapObjectSize); 146 DCHECK(page->area_size() <= kMaxRegularHeapObjectSize);
146 DCHECK(chunk->owner() == owner); 147 DCHECK(chunk->owner() == owner);
147 owner->IncreaseCapacity(page->area_size()); 148 owner->IncreaseCapacity(page->area_size());
148 owner->Free(page->area_start(), page->area_size()); 149 owner->Free(page->area_start(), page->area_size());
149 150
150 heap->incremental_marking()->SetOldSpacePageFlags(chunk); 151 heap->incremental_marking()->SetOldSpacePageFlags(chunk);
151 152
152 return page; 153 return page;
153 } 154 }
154 155
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 405
405 406
406 intptr_t LargeObjectSpace::Available() { 407 intptr_t LargeObjectSpace::Available() {
407 return ObjectSizeFor(heap()->isolate()->memory_allocator()->Available()); 408 return ObjectSizeFor(heap()->isolate()->memory_allocator()->Available());
408 } 409 }
409 410
410 } 411 }
411 } // namespace v8::internal 412 } // namespace v8::internal
412 413
413 #endif // V8_HEAP_SPACES_INL_H_ 414 #endif // V8_HEAP_SPACES_INL_H_
OLDNEW
« no previous file with comments | « src/heap/spaces.cc ('k') | src/heap/store-buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698