Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Side by Side Diff: runtime/vm/heap.h

Issue 11973035: Added heap capacity and used space status methods, for use by status tools. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/heap.cc » ('j') | runtime/vm/heap.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // Verify that all pointers in the heap point to the heap. 148 // Verify that all pointers in the heap point to the heap.
149 bool Verify() const; 149 bool Verify() const;
150 150
151 // Accessor function to get the HeapTrace used for tracing. There 151 // Accessor function to get the HeapTrace used for tracing. There
152 // should only ever be one of these per isolate 152 // should only ever be one of these per isolate
153 HeapTrace* trace() const { return heap_trace_; } 153 HeapTrace* trace() const { return heap_trace_; }
154 154
155 // Print heap sizes. 155 // Print heap sizes.
156 void PrintSizes() const; 156 void PrintSizes() const;
157 157
158 // Return amount of memory used and capacity in a space.
159 intptr_t Used(Space space) const;
160 intptr_t Capacity(Space space) const;
161
158 // Returns the [lowest, highest) addresses in the heap. 162 // Returns the [lowest, highest) addresses in the heap.
159 void StartEndAddress(uword* start, uword* end) const; 163 void StartEndAddress(uword* start, uword* end) const;
160 164
161 ObjectSet* CreateAllocatedObjectSet() const; 165 ObjectSet* CreateAllocatedObjectSet() const;
162 166
163 // Generates a profile of the current and VM isolate heaps. 167 // Generates a profile of the current and VM isolate heaps.
164 void Profile(Dart_FileWriteCallback callback, void* stream) const; 168 void Profile(Dart_FileWriteCallback callback, void* stream) const;
165 void ProfileToFile(const char* reason) const; 169 void ProfileToFile(const char* reason) const;
166 170
167 static const char* GCReasonToString(GCReason gc_reason); 171 static const char* GCReasonToString(GCReason gc_reason);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 public: 270 public:
267 NoGCScope() {} 271 NoGCScope() {}
268 private: 272 private:
269 DISALLOW_COPY_AND_ASSIGN(NoGCScope); 273 DISALLOW_COPY_AND_ASSIGN(NoGCScope);
270 }; 274 };
271 #endif // defined(DEBUG) 275 #endif // defined(DEBUG)
272 276
273 } // namespace dart 277 } // namespace dart
274 278
275 #endif // VM_HEAP_H_ 279 #endif // VM_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/heap.cc » ('j') | runtime/vm/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698