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

Unified Diff: runtime/vm/gc_sweeper.cc

Issue 355123002: If a large object is truncated, also truncate the page. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/gc_sweeper.cc
===================================================================
--- runtime/vm/gc_sweeper.cc (revision 37758)
+++ runtime/vm/gc_sweeper.cc (working copy)
@@ -56,12 +56,12 @@
}
-bool GCSweeper::SweepLargePage(HeapPage* page) {
- bool in_use = false;
+intptr_t GCSweeper::SweepLargePage(HeapPage* page) {
+ intptr_t bytes_to_end = 0;
RawObject* raw_obj = RawObject::FromAddr(page->object_start());
if (raw_obj->IsMarked()) {
raw_obj->ClearMarkBit();
- in_use = true;
+ bytes_to_end += raw_obj->Size();
Ivan Posva 2014/06/30 05:51:05 += -> =
koda 2014/06/30 22:57:48 Done.
}
#ifdef DEBUG
// String::MakeExternal and Array::MakeArray create trailing filler objects,
@@ -74,7 +74,7 @@
current += cur_obj->Size();
}
#endif // DEBUG
- return in_use;
+ return bytes_to_end;
}
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698