Chromium Code Reviews| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 | 107 |
| 108 // Initialize the heap and register it with the isolate. | 108 // Initialize the heap and register it with the isolate. |
| 109 static void Init(Isolate* isolate); | 109 static void Init(Isolate* isolate); |
| 110 | 110 |
| 111 // Verify that all pointers in the heap point to the heap. | 111 // Verify that all pointers in the heap point to the heap. |
| 112 bool Verify() const; | 112 bool Verify() const; |
| 113 | 113 |
| 114 // Print heap sizes. | 114 // Print heap sizes. |
| 115 void PrintSizes() const; | 115 void PrintSizes() const; |
| 116 | 116 |
| 117 // Generates a profile of the current and VM isolate heaps. | |
|
turnidge
2012/05/29 17:50:01
Out of curiosity -- by including the VM isolate he
cshapiro
2012/06/01 04:27:02
Based on experience, the most common use of this d
| |
| 118 void Profile(Dart_HeapProfileWriteCallback callback, void* stream) const; | |
| 119 | |
| 117 private: | 120 private: |
| 118 Heap(); | 121 Heap(); |
| 119 | 122 |
| 120 uword AllocateNew(intptr_t size); | 123 uword AllocateNew(intptr_t size); |
| 121 uword AllocateOld(intptr_t size); | 124 uword AllocateOld(intptr_t size); |
| 122 uword AllocateCode(PageSpace* space, intptr_t size); | 125 uword AllocateCode(PageSpace* space, intptr_t size); |
| 123 | 126 |
| 124 // The different spaces used for allocation. | 127 // The different spaces used for allocation. |
| 125 Scavenger* new_space_; | 128 Scavenger* new_space_; |
| 126 PageSpace* old_space_; | 129 PageSpace* old_space_; |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 144 public: | 147 public: |
| 145 NoGCScope() {} | 148 NoGCScope() {} |
| 146 private: | 149 private: |
| 147 DISALLOW_COPY_AND_ASSIGN(NoGCScope); | 150 DISALLOW_COPY_AND_ASSIGN(NoGCScope); |
| 148 }; | 151 }; |
| 149 #endif // defined(DEBUG) | 152 #endif // defined(DEBUG) |
| 150 | 153 |
| 151 } // namespace dart | 154 } // namespace dart |
| 152 | 155 |
| 153 #endif // VM_HEAP_H_ | 156 #endif // VM_HEAP_H_ |
| OLD | NEW |