Commit fb0c43f0 authored by jochen@chromium.org's avatar jochen@chromium.org

Only refill free lists for spaces that are being swept

BUG=v8:3104
R=hpayer@chromium.org
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c472ee85
......@@ -591,9 +591,18 @@ void MarkCompactCollector::WaitUntilSweepingCompleted() {
intptr_t MarkCompactCollector::RefillFreeLists(PagedSpace* space) {
FreeList* free_list = space == heap()->old_pointer_space()
? free_list_old_pointer_space_.get()
: free_list_old_data_space_.get();
FreeList* free_list;
if (space == heap()->old_pointer_space()) {
free_list = free_list_old_pointer_space_.get();
} else if (space == heap()->old_data_space()) {
free_list = free_list_old_data_space_.get();
} else {
// Any PagedSpace might invoke RefillFreeLists, so we need to make sure
// to only refill them for old data and pointer spaces.
return 0;
}
intptr_t freed_bytes = space->free_list()->Concatenate(free_list);
space->AddToAccountingStats(freed_bytes);
space->DecrementUnsweptFreeBytes(freed_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