1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "src/heap/stress-marking-observer.h"
6 
7 namespace v8 {
8 namespace internal {
9 
10 // TODO(majeski): meaningful step_size
StressMarkingObserver(Heap & heap)11 StressMarkingObserver::StressMarkingObserver(Heap& heap)
12     : AllocationObserver(64), heap_(heap) {}
13 
Step(int bytes_allocated,Address soon_object,size_t size)14 void StressMarkingObserver::Step(int bytes_allocated, Address soon_object,
15                                  size_t size) {
16   heap_.StartIncrementalMarkingIfAllocationLimitIsReached(Heap::kNoGCFlags,
17                                                           kNoGCCallbackFlags);
18 }
19 
20 }  // namespace internal
21 }  // namespace v8
22