| 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 #include "src/heap/heap.h" | 5 #include "src/heap/heap.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 Object** start; | 50 Object** start; |
| 51 Object** end; | 51 Object** end; |
| 52 StrongRootsList* next; | 52 StrongRootsList* next; |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 class IdleScavengeObserver : public InlineAllocationObserver { | 55 class IdleScavengeObserver : public InlineAllocationObserver { |
| 56 public: | 56 public: |
| 57 IdleScavengeObserver(Heap& heap, intptr_t step_size) | 57 IdleScavengeObserver(Heap& heap, intptr_t step_size) |
| 58 : InlineAllocationObserver(step_size), heap_(heap) {} | 58 : InlineAllocationObserver(step_size), heap_(heap) {} |
| 59 | 59 |
| 60 virtual void Step(int bytes_allocated) { | 60 void Step(int bytes_allocated, Address, size_t) override { |
| 61 heap_.ScheduleIdleScavengeIfNeeded(bytes_allocated); | 61 heap_.ScheduleIdleScavengeIfNeeded(bytes_allocated); |
| 62 } | 62 } |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 Heap& heap_; | 65 Heap& heap_; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 | 68 |
| 69 Heap::Heap() | 69 Heap::Heap() |
| 70 : amount_of_external_allocated_memory_(0), | 70 : amount_of_external_allocated_memory_(0), |
| (...skipping 6090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6161 } | 6161 } |
| 6162 | 6162 |
| 6163 | 6163 |
| 6164 // static | 6164 // static |
| 6165 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6165 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6166 return StaticVisitorBase::GetVisitorId(map); | 6166 return StaticVisitorBase::GetVisitorId(map); |
| 6167 } | 6167 } |
| 6168 | 6168 |
| 6169 } // namespace internal | 6169 } // namespace internal |
| 6170 } // namespace v8 | 6170 } // namespace v8 |
| OLD | NEW |