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

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

Issue 10696029: Implement a 2-pass heap verification algorithm. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 8 years, 5 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/object_set.h ('k') | runtime/vm/pages.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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 RawObject* FindObject(FindObjectVisitor* visitor) const; 180 RawObject* FindObject(FindObjectVisitor* visitor) const;
181 181
182 // Collect the garbage in the page space using mark-sweep. 182 // Collect the garbage in the page space using mark-sweep.
183 void MarkSweep(bool invoke_api_callbacks); 183 void MarkSweep(bool invoke_api_callbacks);
184 184
185 static HeapPage* PageFor(RawObject* raw_obj) { 185 static HeapPage* PageFor(RawObject* raw_obj) {
186 return reinterpret_cast<HeapPage*>( 186 return reinterpret_cast<HeapPage*>(
187 RawObject::ToAddr(raw_obj) & ~(kPageSize -1)); 187 RawObject::ToAddr(raw_obj) & ~(kPageSize -1));
188 } 188 }
189 189
190 void StartEndAddress(uword* start, uword* end) const;
191
190 void EnableGrowthControl() { 192 void EnableGrowthControl() {
191 page_space_controller_.Enable(); 193 page_space_controller_.Enable();
192 } 194 }
193 195
194 private: 196 private:
195 static const intptr_t kAllocatablePageSize = kPageSize - sizeof(HeapPage); 197 static const intptr_t kAllocatablePageSize = kPageSize - sizeof(HeapPage);
196 198
197 void AllocatePage(); 199 void AllocatePage();
198 void FreePage(HeapPage* page, HeapPage* previous_page); 200 void FreePage(HeapPage* page, HeapPage* previous_page);
199 HeapPage* AllocateLargePage(intptr_t size); 201 HeapPage* AllocateLargePage(intptr_t size);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 bool sweeping_; 240 bool sweeping_;
239 241
240 PageSpaceController page_space_controller_; 242 PageSpaceController page_space_controller_;
241 243
242 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); 244 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace);
243 }; 245 };
244 246
245 } // namespace dart 247 } // namespace dart
246 248
247 #endif // VM_PAGES_H_ 249 #endif // VM_PAGES_H_
OLDNEW
« no previous file with comments | « runtime/vm/object_set.h ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698