Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Merged: [heap] Properly propagate allocated space during new space ev…
Browse files Browse the repository at this point in the history
…acuaton in MC

Revision: bb4974d

BUG=chromium:641270
LOG=N
NOTRY=true
NOPRESUBMIT=true
NOTREECHECKS=true
[email protected]

Review-Url: https://codereview.chromium.org/2318583002
Cr-Commit-Position: refs/branch-heads/5.4@{#23}
Cr-Branched-From: 5ce2827-refs/heads/5.4.500@{#2}
Cr-Branched-From: ad07b49-refs/heads/master@{#38841}
  • Loading branch information
mlippautz authored and Commit bot committed Sep 6, 2016
1 parent 3db8b18 commit ab91125
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/heap/mark-compact.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1745,6 +1745,7 @@ class MarkCompactCollector::EvacuateNewSpaceVisitor final
const int size = old_object->Size();
AllocationAlignment alignment = old_object->RequiredAlignment();
AllocationResult allocation;
AllocationSpace space_allocated_in = space_to_allocate_;
if (space_to_allocate_ == NEW_SPACE) {
if (size > kMaxLabObjectSize) {
allocation =
Expand All @@ -1755,11 +1756,12 @@ class MarkCompactCollector::EvacuateNewSpaceVisitor final
}
if (allocation.IsRetry() || (space_to_allocate_ == OLD_SPACE)) {
allocation = AllocateInOldSpace(size, alignment);
space_allocated_in = OLD_SPACE;
}
bool ok = allocation.To(target_object);
DCHECK(ok);
USE(ok);
return space_to_allocate_;
return space_allocated_in;
}

inline bool NewLocalAllocationBuffer() {
Expand Down

0 comments on commit ab91125

Please sign in to comment.