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

Unified Diff: vm/gc_marker.h

Issue 8761006: - Implement a simple old-generation marker. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/vm/vm.status ('k') | vm/gc_marker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/gc_marker.h
===================================================================
--- vm/gc_marker.h (revision 0)
+++ vm/gc_marker.h (revision 0)
@@ -0,0 +1,39 @@
+// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef VM_GC_MARKER_H_
+#define VM_GC_MARKER_H_
+
+#include "vm/allocation.h"
+
+namespace dart {
+
+// Forward declarations.
+class Heap;
+class Isolate;
+class MarkingVisitor;
+class PageSpace;
+
+// The class GCMarker is used to mark reachable old generation objects as part
+// of the mark-sweep collection. The marking bit used is defined in RawObject.
+class GCMarker : public ValueObject {
+ public:
+ explicit GCMarker(Heap* heap) : heap_(heap) { }
+ ~GCMarker() { }
+
+ void MarkObjects(Isolate* isolate, PageSpace* page_space);
+
+ private:
+ void Prologue(Isolate* isolate);
+ void IterateRoots(Isolate* isolate, MarkingVisitor* visitor);
+ void DrainMarkingStack(Isolate* isolate, MarkingVisitor* visitor);
+
+ Heap* heap_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(GCMarker);
+};
+
+} // namespace dart
+
+#endif // VM_GC_MARKER_H_
« no previous file with comments | « tests/vm/vm.status ('k') | vm/gc_marker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698