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

Unified Diff: runtime/vm/pages.cc

Issue 2349023002: Remove assumption from the heap verifier that objects occupy a narrow range of the address space. (Closed)
Patch Set: . Created 4 years, 3 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/pages.cc
diff --git a/runtime/vm/pages.cc b/runtime/vm/pages.cc
index 2f894b53a2bfc9ed7c7710aed1d831533190203f..80527f2f4bf0bb8baa8e56c6b574090a84ee8316 100644
--- a/runtime/vm/pages.cc
+++ b/runtime/vm/pages.cc
@@ -10,6 +10,7 @@
#include "vm/gc_sweeper.h"
#include "vm/lockers.h"
#include "vm/object.h"
+#include "vm/object_set.h"
#include "vm/os_thread.h"
#include "vm/safepoint.h"
#include "vm/virtual_memory.h"
@@ -588,16 +589,11 @@ bool PageSpace::Contains(uword addr, HeapPage::PageType type) const {
}
-void PageSpace::StartEndAddress(uword* start, uword* end) const {
+void PageSpace::AddRegionsToObjectSet(ObjectSet* set) const {
ASSERT((pages_ != NULL) || (exec_pages_ != NULL) || (large_pages_ != NULL));
- *start = static_cast<uword>(~0);
- *end = 0;
for (ExclusivePageIterator it(this); !it.Done(); it.Advance()) {
- *start = Utils::Minimum(*start, it.page()->object_start());
- *end = Utils::Maximum(*end, it.page()->object_end());
+ set->AddRegion(it.page()->object_start(), it.page()->object_end());
}
- ASSERT(*start != static_cast<uword>(~0));
- ASSERT(*end != 0);
}
« runtime/vm/object_set.h ('K') | « runtime/vm/pages.h ('k') | runtime/vm/scavenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698