Commit 8789eca0 authored by mlippautz's avatar mlippautz Committed by Commit bot

[heap] Fix helping sweeping for parallel compaction spaces

R=hpayer@chromium.org
BUG=chromium:524425
LOG=N

Review URL: https://codereview.chromium.org/1413223011

Cr-Commit-Position: refs/heads/master@{#31724}
parent 7d7292a6
...@@ -2752,15 +2752,10 @@ HeapObject* PagedSpace::SlowAllocateRaw(int size_in_bytes) { ...@@ -2752,15 +2752,10 @@ HeapObject* PagedSpace::SlowAllocateRaw(int size_in_bytes) {
if (object != NULL) return object; if (object != NULL) return object;
// If sweeping is still in progress try to sweep pages on the main thread. // If sweeping is still in progress try to sweep pages on the main thread.
int free_chunk = collector->SweepInParallel(this, size_in_bytes); collector->SweepInParallel(heap()->paged_space(identity()), size_in_bytes);
RefillFreeList(); RefillFreeList();
if (free_chunk >= size_in_bytes) { object = free_list_.Allocate(size_in_bytes);
HeapObject* object = free_list_.Allocate(size_in_bytes); if (object != nullptr) return object;
// We should be able to allocate an object here since we just freed that
// much memory.
DCHECK(object != NULL);
if (object != NULL) return object;
}
} }
// Free list allocation failed and there is no next page. Fail if we have // Free list allocation failed and there is no next page. Fail if we have
......
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