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

Issue 8507038: Fix Heap::Shrink to ensure that it does not free pages that are still in use. (Closed)

Created:
9 years, 1 month ago by Vyacheslav Egorov (Chromium)
Modified:
9 years, 1 month ago
Reviewers:
Michael Starzinger
CC:
v8-dev
Visibility:
Public.

Description

Fix Heap::Shrink to ensure that it does not free pages that are still in use. Heap::Shrink is called from EnsureFromSpaceIsCommitted at the very start of the GC. At this moment live bytes counts on pages are in inconsistent states. Some pages might have been already swept but have not been yet reached by an incremental marker (or incremental marker is not in progress) and have live bytes count set to 0. Thus we can't rely only on LiveBytes to determine which pages can be released to the OS. R=mstarzinger@chromium.org BUG=100414 Committed: http://code.google.com/p/v8/source/detail?r=9953

Patch Set 1 #

Total comments: 2

Patch Set 2 : get rid of last_unswept_page_, add comment about Heap::ReserveSpace #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -39 lines) Patch
M src/heap.cc View 1 chunk +4 lines, -1 line 0 comments Download
M src/mark-compact.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/spaces.h View 1 7 chunks +34 lines, -21 lines 0 comments Download
M src/spaces.cc View 1 8 chunks +83 lines, -16 lines 1 comment Download

Messages

Total messages: 3 (0 generated)
Vyacheslav Egorov (Chromium)
9 years, 1 month ago (2011-11-10 01:21:51 UTC) #1
Michael Starzinger
LGTM (with nits). http://codereview.chromium.org/8507038/diff/1/src/spaces.cc File src/spaces.cc (right): http://codereview.chromium.org/8507038/diff/1/src/spaces.cc#newcode758 src/spaces.cc:758: // Adjust list of unswept pages ...
9 years, 1 month ago (2011-11-10 12:35:40 UTC) #2
Michael Starzinger
9 years, 1 month ago (2011-11-10 12:52:45 UTC) #3
LGTM.

http://codereview.chromium.org/8507038/diff/5001/src/spaces.cc
File src/spaces.cc (right):

http://codereview.chromium.org/8507038/diff/5001/src/spaces.cc#newcode801
src/spaces.cc:801: // by free list items.
Wow, that's tricky. Nice catch!

Powered by Google App Engine
This is Rietveld 408576698