OLD | NEW |
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 #ifndef V8_HEAP_INCREMENTAL_MARKING_H_ | 5 #ifndef V8_HEAP_INCREMENTAL_MARKING_H_ |
6 #define V8_HEAP_INCREMENTAL_MARKING_H_ | 6 #define V8_HEAP_INCREMENTAL_MARKING_H_ |
7 | 7 |
8 #include "src/cancelable-task.h" | 8 #include "src/cancelable-task.h" |
9 #include "src/execution.h" | 9 #include "src/execution.h" |
10 #include "src/heap/heap.h" | 10 #include "src/heap/heap.h" |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 marking_deque_ = marking_deque; | 255 marking_deque_ = marking_deque; |
256 } | 256 } |
257 | 257 |
258 private: | 258 private: |
259 class Observer : public AllocationObserver { | 259 class Observer : public AllocationObserver { |
260 public: | 260 public: |
261 Observer(IncrementalMarking& incremental_marking, intptr_t step_size) | 261 Observer(IncrementalMarking& incremental_marking, intptr_t step_size) |
262 : AllocationObserver(step_size), | 262 : AllocationObserver(step_size), |
263 incremental_marking_(incremental_marking) {} | 263 incremental_marking_(incremental_marking) {} |
264 | 264 |
265 void Step(int bytes_allocated, Address, size_t) override { | 265 void Step(int bytes_allocated, Address, size_t) override; |
266 incremental_marking_.AdvanceIncrementalMarkingOnAllocation(); | |
267 } | |
268 | 266 |
269 private: | 267 private: |
270 IncrementalMarking& incremental_marking_; | 268 IncrementalMarking& incremental_marking_; |
271 }; | 269 }; |
272 | 270 |
273 int64_t SpaceLeftInOldSpace(); | 271 int64_t SpaceLeftInOldSpace(); |
274 | 272 |
275 void StartMarking(); | 273 void StartMarking(); |
276 | 274 |
277 void StartBlackAllocation(); | 275 void StartBlackAllocation(); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 337 |
340 Observer new_generation_observer_; | 338 Observer new_generation_observer_; |
341 Observer old_generation_observer_; | 339 Observer old_generation_observer_; |
342 | 340 |
343 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 341 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
344 }; | 342 }; |
345 } // namespace internal | 343 } // namespace internal |
346 } // namespace v8 | 344 } // namespace v8 |
347 | 345 |
348 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ | 346 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ |
OLD | NEW |