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

Unified Diff: runtime/vm/gc_sweeper.cc

Issue 253493002: - Account for live size in marker. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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 35390)
+++ runtime/vm/gc_sweeper.cc (working copy)
@@ -11,10 +11,10 @@
namespace dart {
-intptr_t GCSweeper::SweepPage(HeapPage* page, FreeList* freelist) {
+bool GCSweeper::SweepPage(HeapPage* page, FreeList* freelist) {
// Keep track of the discovered live object sizes to be able to finish
koda 2014/04/24 23:09:56 Update comment; we are not tracking sizes here.
Ivan Posva 2014/04/24 23:17:50 Done.
- // sweeping early. Reset the per page in_use count for the next marking phase.
- intptr_t in_use = 0;
+ // sweeping early.
+ bool in_use = false;
bool is_executable = (page->type() == HeapPage::kExecutable);
uword start = page->object_start();
@@ -28,7 +28,7 @@
// Found marked object. Clear the mark bit and update swept bytes.
raw_obj->ClearMarkBit();
obj_size = raw_obj->Size();
- in_use += obj_size;
+ in_use = true;
} else {
uword free_end = current + raw_obj->Size();
while (free_end < end) {
@@ -57,15 +57,15 @@
}
-intptr_t GCSweeper::SweepLargePage(HeapPage* page) {
+bool GCSweeper::SweepLargePage(HeapPage* page) {
RawObject* raw_obj = RawObject::FromAddr(page->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;
+ return false;
}
raw_obj->ClearMarkBit();
- return raw_obj->Size();
+ return true;
}
} // namespace dart
« no previous file with comments | « runtime/vm/gc_sweeper.h ('k') | runtime/vm/pages.cc » ('j') | runtime/vm/pages.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698