Commit ebe9e8cb authored by hpayer's avatar hpayer Committed by Commit bot

[heap] Install a filler in newly allocated large objects to re-use ObjectMarking infrastructure.

BUG=chromium:694255

Review-Url: https://codereview.chromium.org/2728723004
Cr-Commit-Position: refs/heads/master@{#43560}
parent 4909edeb
...@@ -3014,10 +3014,11 @@ AllocationResult LargeObjectSpace::AllocateRaw(int object_size, ...@@ -3014,10 +3014,11 @@ AllocationResult LargeObjectSpace::AllocateRaw(int object_size,
kNoGCCallbackFlags); kNoGCCallbackFlags);
AllocationStep(object->address(), object_size); AllocationStep(object->address(), object_size);
heap()->CreateFillerObjectAt(object->address(), object_size,
ClearRecordedSlots::kNo);
if (heap()->incremental_marking()->black_allocation()) { if (heap()->incremental_marking()->black_allocation()) {
// We cannot use ObjectMarking here as the object still lacks a size. ObjectMarking::WhiteToBlack(object);
Marking::WhiteToBlack(ObjectMarking::MarkBitFrom(object));
MemoryChunk::IncrementLiveBytes(object, object_size);
} }
return object; return object;
} }
...@@ -3182,12 +3183,13 @@ void LargeObjectSpace::Verify() { ...@@ -3182,12 +3183,13 @@ void LargeObjectSpace::Verify() {
// We have only code, sequential strings, external strings // We have only code, sequential strings, external strings
// (sequential strings that have been morphed into external // (sequential strings that have been morphed into external
// strings), thin strings (sequential strings that have been // strings), thin strings (sequential strings that have been
// morphed into thin strings), fixed arrays, byte arrays, and // morphed into thin strings), fixed arrays, fixed double arrays,
// constant pool arrays in the large object space. // byte arrays, and free space (right after allocation) in the
// large object space.
CHECK(object->IsAbstractCode() || object->IsSeqString() || CHECK(object->IsAbstractCode() || object->IsSeqString() ||
object->IsExternalString() || object->IsThinString() || object->IsExternalString() || object->IsThinString() ||
object->IsFixedArray() || object->IsFixedDoubleArray() || object->IsFixedArray() || object->IsFixedDoubleArray() ||
object->IsByteArray()); object->IsByteArray() || object->IsFreeSpace());
// The object itself should look OK. // The object itself should look OK.
object->ObjectVerify(); object->ObjectVerify();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment