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

Unified Diff: vm/gc_sweeper.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | vm/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/gc_sweeper.cc
===================================================================
--- vm/gc_sweeper.cc (revision 2587)
+++ vm/gc_sweeper.cc (working copy)
@@ -60,8 +60,14 @@
intptr_t GCSweeper::SweepLargePage(HeapPage* page) {
- UNIMPLEMENTED();
- return 0;
+ RawObject* raw_obj = RawObject::FromAddr(page->first_object_start());
+ if (!raw_obj->IsMarked()) {
+ // The large object was not marked. Used size is zero, which also tells the
+ // calling code that the large object page can be recycled.
+ return 0;
+ }
+ raw_obj->ClearMarkBit();
+ return raw_obj->Size();
}
} // namespace dart
« no previous file with comments | « no previous file | vm/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698