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

Side by Side Diff: src/heap/spaces.cc

Issue 937833002: Unlink pages from the space page list after evacuation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « src/heap/mark-compact.cc ('k') | test/mjsunit/regress/regress-430201.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/platform/platform.h" 8 #include "src/base/platform/platform.h"
9 #include "src/full-codegen.h" 9 #include "src/full-codegen.h"
10 #include "src/heap/mark-compact.h" 10 #include "src/heap/mark-compact.h"
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 page->ClearFlag(MemoryChunk::SCAN_ON_SCAVENGE); 1103 page->ClearFlag(MemoryChunk::SCAN_ON_SCAVENGE);
1104 } 1104 }
1105 1105
1106 DCHECK(!free_list_.ContainsPageFreeListItems(page)); 1106 DCHECK(!free_list_.ContainsPageFreeListItems(page));
1107 1107
1108 if (Page::FromAllocationTop(allocation_info_.top()) == page) { 1108 if (Page::FromAllocationTop(allocation_info_.top()) == page) {
1109 allocation_info_.set_top(NULL); 1109 allocation_info_.set_top(NULL);
1110 allocation_info_.set_limit(NULL); 1110 allocation_info_.set_limit(NULL);
1111 } 1111 }
1112 1112
1113 page->Unlink(); 1113 // If page is still in a list, unlink it from that list.
1114 if (page->next_chunk() != NULL) {
1115 DCHECK(page->prev_chunk() != NULL);
1116 page->Unlink();
1117 }
1118
1114 if (page->IsFlagSet(MemoryChunk::CONTAINS_ONLY_DATA)) { 1119 if (page->IsFlagSet(MemoryChunk::CONTAINS_ONLY_DATA)) {
1115 heap()->isolate()->memory_allocator()->Free(page); 1120 heap()->isolate()->memory_allocator()->Free(page);
1116 } else { 1121 } else {
1117 heap()->QueueMemoryChunkForFree(page); 1122 heap()->QueueMemoryChunkForFree(page);
1118 } 1123 }
1119 1124
1120 DCHECK(Capacity() > 0); 1125 DCHECK(Capacity() > 0);
1121 accounting_stats_.ShrinkSpace(AreaSize()); 1126 accounting_stats_.ShrinkSpace(AreaSize());
1122 } 1127 }
1123 1128
(...skipping 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after
3130 object->ShortPrint(); 3135 object->ShortPrint();
3131 PrintF("\n"); 3136 PrintF("\n");
3132 } 3137 }
3133 printf(" --------------------------------------\n"); 3138 printf(" --------------------------------------\n");
3134 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3139 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3135 } 3140 }
3136 3141
3137 #endif // DEBUG 3142 #endif // DEBUG
3138 } 3143 }
3139 } // namespace v8::internal 3144 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | test/mjsunit/regress/regress-430201.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698