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

Side by Side Diff: vm/pages.h

Issue 8996011: - Trigger old-gen GCs when needed. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 9 years 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
« vm/heap.cc ('K') | « vm/heap.cc ('k') | vm/raw_object.cc » ('j') | 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 PageSpace(Heap* heap, intptr_t max_capacity, bool is_executable = false); 73 PageSpace(Heap* heap, intptr_t max_capacity, bool is_executable = false);
74 ~PageSpace(); 74 ~PageSpace();
75 75
76 uword TryAllocate(intptr_t size); 76 uword TryAllocate(intptr_t size);
77 77
78 intptr_t in_use() const { return in_use_; } 78 intptr_t in_use() const { return in_use_; }
79 bool Contains(uword addr) const; 79 bool Contains(uword addr) const;
80 bool IsValidAddress(uword addr) const { 80 bool IsValidAddress(uword addr) const {
81 return Contains(addr); 81 return Contains(addr);
82 } 82 }
83 static intptr_t IsPageAllocatableSize(intptr_t size) { 83 static bool IsPageAllocatableSize(intptr_t size) {
84 return size <= kAllocatablePageSize; 84 return size <= kAllocatablePageSize;
85 } 85 }
86 86
87 void VisitObjectPointers(ObjectPointerVisitor* visitor) const; 87 void VisitObjectPointers(ObjectPointerVisitor* visitor) const;
88 88
89 // Collect the garbage in the page space using mark-sweep. 89 // Collect the garbage in the page space using mark-sweep.
90 void MarkSweep(); 90 void MarkSweep();
91 91
92 static HeapPage* PageFor(RawObject* raw_obj) { 92 static HeapPage* PageFor(RawObject* raw_obj) {
93 return reinterpret_cast<HeapPage*>( 93 return reinterpret_cast<HeapPage*>(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 // Keep track whether a MarkSweep is currently running. 131 // Keep track whether a MarkSweep is currently running.
132 bool sweeping_; 132 bool sweeping_;
133 133
134 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); 134 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace);
135 }; 135 };
136 136
137 } // namespace dart 137 } // namespace dart
138 138
139 #endif // VM_PAGES_H_ 139 #endif // VM_PAGES_H_
OLDNEW
« vm/heap.cc ('K') | « vm/heap.cc ('k') | vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698