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

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

Issue 953813002: Version 4.1.0.21 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.1
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') | src/version.cc » ('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 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 page->ClearFlag(MemoryChunk::SCAN_ON_SCAVENGE); 1135 page->ClearFlag(MemoryChunk::SCAN_ON_SCAVENGE);
1136 } 1136 }
1137 1137
1138 DCHECK(!free_list_.ContainsPageFreeListItems(page)); 1138 DCHECK(!free_list_.ContainsPageFreeListItems(page));
1139 1139
1140 if (Page::FromAllocationTop(allocation_info_.top()) == page) { 1140 if (Page::FromAllocationTop(allocation_info_.top()) == page) {
1141 allocation_info_.set_top(NULL); 1141 allocation_info_.set_top(NULL);
1142 allocation_info_.set_limit(NULL); 1142 allocation_info_.set_limit(NULL);
1143 } 1143 }
1144 1144
1145 page->Unlink(); 1145 // If page is still in a list, unlink it from that list.
1146 if (page->next_chunk() != NULL) {
1147 DCHECK(page->prev_chunk() != NULL);
1148 page->Unlink();
1149 }
1150
1146 if (page->IsFlagSet(MemoryChunk::CONTAINS_ONLY_DATA)) { 1151 if (page->IsFlagSet(MemoryChunk::CONTAINS_ONLY_DATA)) {
1147 heap()->isolate()->memory_allocator()->Free(page); 1152 heap()->isolate()->memory_allocator()->Free(page);
1148 } else { 1153 } else {
1149 heap()->QueueMemoryChunkForFree(page); 1154 heap()->QueueMemoryChunkForFree(page);
1150 } 1155 }
1151 1156
1152 DCHECK(Capacity() > 0); 1157 DCHECK(Capacity() > 0);
1153 accounting_stats_.ShrinkSpace(AreaSize()); 1158 accounting_stats_.ShrinkSpace(AreaSize());
1154 } 1159 }
1155 1160
(...skipping 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after
3224 object->ShortPrint(); 3229 object->ShortPrint();
3225 PrintF("\n"); 3230 PrintF("\n");
3226 } 3231 }
3227 printf(" --------------------------------------\n"); 3232 printf(" --------------------------------------\n");
3228 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3233 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3229 } 3234 }
3230 3235
3231 #endif // DEBUG 3236 #endif // DEBUG
3232 } 3237 }
3233 } // namespace v8::internal 3238 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698