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

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

Issue 220113004: Trigger old-space GC when scavange made the external heap of old-space larger than max old-space si… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cleanup code. Created 6 years, 8 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 | « runtime/vm/heap.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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_PAGES_H_ 5 #ifndef VM_PAGES_H_
6 #define VM_PAGES_H_ 6 #define VM_PAGES_H_
7 7
8 #include "vm/freelist.h" 8 #include "vm/freelist.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/virtual_memory.h" 10 #include "vm/virtual_memory.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 void StartEndAddress(uword* start, uword* end) const; 214 void StartEndAddress(uword* start, uword* end) const;
215 215
216 void SetGrowthControlState(bool state) { 216 void SetGrowthControlState(bool state) {
217 page_space_controller_.set_is_enabled(state); 217 page_space_controller_.set_is_enabled(state);
218 } 218 }
219 219
220 bool GrowthControlState() { 220 bool GrowthControlState() {
221 return page_space_controller_.is_enabled(); 221 return page_space_controller_.is_enabled();
222 } 222 }
223 223
224 bool NeedExternalGC() {
225 return used_in_words_ + ExternalInWords() > max_capacity_in_words_;
226 }
227
224 void WriteProtect(bool read_only); 228 void WriteProtect(bool read_only);
225 229
226 void AddGCTime(int64_t micros) { 230 void AddGCTime(int64_t micros) {
227 gc_time_micros_ += micros; 231 gc_time_micros_ += micros;
228 } 232 }
229 233
230 int64_t gc_time_micros() const { 234 int64_t gc_time_micros() const {
231 return gc_time_micros_; 235 return gc_time_micros_;
232 } 236 }
233 237
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 intptr_t collections_; 302 intptr_t collections_;
299 303
300 friend class PageSpaceController; 304 friend class PageSpaceController;
301 305
302 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); 306 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace);
303 }; 307 };
304 308
305 } // namespace dart 309 } // namespace dart
306 310
307 #endif // VM_PAGES_H_ 311 #endif // VM_PAGES_H_
OLDNEW
« no previous file with comments | « runtime/vm/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698