| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_HEAP_H_ | 5 #ifndef VM_HEAP_H_ |
| 6 #define VM_HEAP_H_ | 6 #define VM_HEAP_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 } | 232 } |
| 233 | 233 |
| 234 bool gc_in_progress() const { return gc_in_progress_; } | 234 bool gc_in_progress() const { return gc_in_progress_; } |
| 235 | 235 |
| 236 static bool IsAllocatableInNewSpace(intptr_t size) { | 236 static bool IsAllocatableInNewSpace(intptr_t size) { |
| 237 return size <= kNewAllocatableSize; | 237 return size <= kNewAllocatableSize; |
| 238 } | 238 } |
| 239 | 239 |
| 240 void PrintToJSONObject(Space space, JSONObject* object) const; | 240 void PrintToJSONObject(Space space, JSONObject* object) const; |
| 241 | 241 |
| 242 // The heap map is an array of sizes and class ids (except freelist is 0). | 242 // The heap map contains the sizes and class ids for the objects in each page. |
| 243 void PrintHeapMapToJSONStream(JSONStream* stream) const { | 243 void PrintHeapMapToJSONStream(Isolate* isolate, JSONStream* stream) const { |
| 244 return old_space_->PrintHeapMapToJSONStream(stream); | 244 return old_space_->PrintHeapMapToJSONStream(isolate, stream); |
| 245 } | 245 } |
| 246 | 246 |
| 247 private: | 247 private: |
| 248 class GCStats : public ValueObject { | 248 class GCStats : public ValueObject { |
| 249 public: | 249 public: |
| 250 GCStats() {} | 250 GCStats() {} |
| 251 intptr_t num_; | 251 intptr_t num_; |
| 252 Heap::Space space_; | 252 Heap::Space space_; |
| 253 Heap::GCReason reason_; | 253 Heap::GCReason reason_; |
| 254 | 254 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 NoHeapGrowthControlScope(); | 336 NoHeapGrowthControlScope(); |
| 337 ~NoHeapGrowthControlScope(); | 337 ~NoHeapGrowthControlScope(); |
| 338 private: | 338 private: |
| 339 bool current_growth_controller_state_; | 339 bool current_growth_controller_state_; |
| 340 DISALLOW_COPY_AND_ASSIGN(NoHeapGrowthControlScope); | 340 DISALLOW_COPY_AND_ASSIGN(NoHeapGrowthControlScope); |
| 341 }; | 341 }; |
| 342 | 342 |
| 343 } // namespace dart | 343 } // namespace dart |
| 344 | 344 |
| 345 #endif // VM_HEAP_H_ | 345 #endif // VM_HEAP_H_ |
| OLD | NEW |