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

Unified Diff: runtime/vm/heap.cc

Issue 2992753002: Prepares allocation for proper sync with mutator and bg threads. (Closed)
Patch Set: Removes comments and checks for unscheduled mutator Created 3 years, 4 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
« no previous file with comments | « runtime/vm/heap.h ('k') | runtime/vm/scavenger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap.cc
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc
index 70a34f2e325cee60f511f9601aaa712d8f2808fe..7f0472ca2bfcdae09f67dceedf703ca0d9498786 100644
--- a/runtime/vm/heap.cc
+++ b/runtime/vm/heap.cc
@@ -58,7 +58,7 @@ Heap::~Heap() {
}
}
-void Heap::FillRemainingTLAB(Thread* thread) {
+void Heap::MakeTLABIterable(Thread* thread) {
uword start = thread->top();
uword end = thread->end();
ASSERT(end >= start);
@@ -67,12 +67,11 @@ void Heap::FillRemainingTLAB(Thread* thread) {
if (size >= kObjectAlignment) {
FreeListElement::AsElement(start, size);
ASSERT(RawObject::FromAddr(start)->Size() == size);
- ASSERT((start + size) == new_space_.top());
}
}
void Heap::AbandonRemainingTLAB(Thread* thread) {
- FillRemainingTLAB(thread);
+ MakeTLABIterable(thread);
thread->set_top(0);
thread->set_end(0);
}
@@ -630,6 +629,7 @@ bool Heap::VerifyGC(MarkExpectation mark_expectation) const {
ObjectSet* allocated_set =
CreateAllocatedObjectSet(stack_zone.GetZone(), mark_expectation);
VerifyPointersVisitor visitor(isolate(), allocated_set);
+
VisitObjectPointers(&visitor);
// Only returning a value so that Heap::Validate can be called from an ASSERT.
« no previous file with comments | « runtime/vm/heap.h ('k') | runtime/vm/scavenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698