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

Issue 7281006: Fix bug in semispace shrink-to. (Closed)

Created:
9 years, 5 months ago by Lasse Reichstein
Modified:
9 years, 5 months ago
CC:
v8-dev
Visibility:
Public.

Description

Fix bug in semispace shrink-to. Committed: http://code.google.com/p/v8/source/detail?r=8463

Patch Set 1 #

Patch Set 2 : And a little cleanup. #

Total comments: 4

Patch Set 3 : Address review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -4 lines) Patch
M src/spaces.cc View 1 2 1 chunk +7 lines, -4 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein
9 years, 5 months ago (2011-06-29 11:10:43 UTC) #1
Vyacheslav Egorov (Chromium)
LGMT http://codereview.chromium.org/7281006/diff/1001/src/spaces.cc File src/spaces.cc (right): http://codereview.chromium.org/7281006/diff/1001/src/spaces.cc#newcode1226 src/spaces.cc:1226: Address old_start = space_end - capacity_; please add ...
9 years, 5 months ago (2011-06-29 11:16:59 UTC) #2
Lasse Reichstein
9 years, 5 months ago (2011-06-29 11:31:13 UTC) #3
http://codereview.chromium.org/7281006/diff/1001/src/spaces.cc
File src/spaces.cc (right):

http://codereview.chromium.org/7281006/diff/1001/src/spaces.cc#newcode1226
src/spaces.cc:1226: Address old_start = space_end - capacity_;
On 2011/06/29 11:16:59, Vyacheslav Egorov wrote:
> please add a comment about new space growing backwards from the end of the
> reserved space.

Done.

http://codereview.chromium.org/7281006/diff/1001/src/spaces.cc#newcode1229
src/spaces.cc:1229: if
(!heap()->isolate()->memory_allocator()->UncommitBlock(old_start, delta)) {
And you are correct to be worried.
It won't happen that we free part of a page that contains content, but that's
due to the interaction of minimum_capacity and the times-2 multiplier in Shrink,
so instead of trying to codify that, we sohuld just round up before calling
ShrinkTo. I'll change my other CL to do that instead of removing the assertion.

Powered by Google App Engine
This is Rietveld 408576698