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

Unified Diff: src/mark-compact.cc

Issue 143953005: Only refill free lists for spaces that are being swept (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index f62435ea9334c196fc2231bb6e6893e7d0320aa1..9670925045205c89ecfd49cd19714d6a1fd4d07c 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698