Commit 9997530d authored by hpayer's avatar hpayer Committed by Commit bot

[heap] Make aligned allocations in black areas completely black.

BUG=

Review-Url: https://codereview.chromium.org/2591433002
Cr-Commit-Position: refs/heads/master@{#41814}
parent 9fcceeb1
...@@ -471,18 +471,20 @@ AllocationResult PagedSpace::AllocateRawAligned(int size_in_bytes, ...@@ -471,18 +471,20 @@ AllocationResult PagedSpace::AllocateRawAligned(int size_in_bytes,
object = free_list_.Allocate(allocation_size); object = free_list_.Allocate(allocation_size);
if (object == NULL) { if (object == NULL) {
object = SlowAllocateRaw(allocation_size); object = SlowAllocateRaw(allocation_size);
if (object != NULL && heap()->incremental_marking()->black_allocation()) { }
if (object != NULL) {
if (heap()->incremental_marking()->black_allocation()) {
Address start = object->address(); Address start = object->address();
Address end = object->address() + size_in_bytes; Address end = object->address() + allocation_size;
Page::FromAllocationAreaAddress(start)->CreateBlackArea(start, end); Page::FromAllocationAreaAddress(start)->CreateBlackArea(start, end);
} }
} if (filler_size != 0) {
if (object != NULL && filler_size != 0) { object = heap()->AlignWithFiller(object, size_in_bytes, allocation_size,
object = heap()->AlignWithFiller(object, size_in_bytes, allocation_size, alignment);
alignment); // Filler objects are initialized, so mark only the aligned object
// Filler objects are initialized, so mark only the aligned object memory // memory as uninitialized.
// as uninitialized. allocation_size = size_in_bytes;
allocation_size = size_in_bytes; }
} }
} }
......
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