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

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

Issue 9655011: Implement prologue weak persistent handles. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: final revision Created 8 years, 9 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.cc ('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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 bool IsValidAddress(uword addr) const { 80 bool IsValidAddress(uword addr) const {
81 return Contains(addr); 81 return Contains(addr);
82 } 82 }
83 static bool 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(bool invoke_api_callbacks);
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*>(
94 RawObject::ToAddr(raw_obj) & ~(kPageSize -1)); 94 RawObject::ToAddr(raw_obj) & ~(kPageSize -1));
95 } 95 }
96 96
97 private: 97 private:
98 static const intptr_t kAllocatablePageSize = kPageSize - sizeof(HeapPage); 98 static const intptr_t kAllocatablePageSize = kPageSize - sizeof(HeapPage);
99 99
100 void AllocatePage(); 100 void AllocatePage();
(...skipping 29 matching lines...) Expand all
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
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698