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

Unified Diff: src/heap/spaces.cc

Issue 2728723004: [heap] Install a filler in newly allocated large objects to re-use ObjectMarking infrastructure. (Closed)
Patch Set: fix comment Created 3 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index 22833852067709f14d5da187636d124b0e004f38..e9d8030c5bd5d540a5549b767861b7b8c516ea78 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -3014,10 +3014,11 @@ AllocationResult LargeObjectSpace::AllocateRaw(int object_size,
kNoGCCallbackFlags);
AllocationStep(object->address(), object_size);
+ heap()->CreateFillerObjectAt(object->address(), object_size,
+ ClearRecordedSlots::kNo);
+
if (heap()->incremental_marking()->black_allocation()) {
- // We cannot use ObjectMarking here as the object still lacks a size.
- Marking::WhiteToBlack(ObjectMarking::MarkBitFrom(object));
- MemoryChunk::IncrementLiveBytes(object, object_size);
+ ObjectMarking::WhiteToBlack(object);
}
return object;
}
@@ -3182,12 +3183,13 @@ void LargeObjectSpace::Verify() {
// We have only code, sequential strings, external strings
// (sequential strings that have been morphed into external
// strings), thin strings (sequential strings that have been
- // morphed into thin strings), fixed arrays, byte arrays, and
- // constant pool arrays in the large object space.
+ // morphed into thin strings), fixed arrays, fixed double arrays,
+ // byte arrays, and free space (right after allocation) in the
+ // large object space.
CHECK(object->IsAbstractCode() || object->IsSeqString() ||
object->IsExternalString() || object->IsThinString() ||
object->IsFixedArray() || object->IsFixedDoubleArray() ||
- object->IsByteArray());
+ object->IsByteArray() || object->IsFreeSpace());
// The object itself should look OK.
object->ObjectVerify();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698