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

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

Issue 905773004: Mark pages created during bootstrapping as never-evacuate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: like this? 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/spaces.h ('k') | no next file » | 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 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 1025
1026 bool PagedSpace::Expand() { 1026 bool PagedSpace::Expand() {
1027 if (!CanExpand()) return false; 1027 if (!CanExpand()) return false;
1028 1028
1029 intptr_t size = AreaSize(); 1029 intptr_t size = AreaSize();
1030 1030
1031 Page* p = heap()->isolate()->memory_allocator()->AllocatePage(size, this, 1031 Page* p = heap()->isolate()->memory_allocator()->AllocatePage(size, this,
1032 executable()); 1032 executable());
1033 if (p == NULL) return false; 1033 if (p == NULL) return false;
1034 1034
1035 // Pages created during bootstrapping may contain immortal immovable objects.
1036 if (!heap()->deserialization_complete()) p->MarkNeverEvacuate();
1037
1035 DCHECK(Capacity() <= max_capacity_); 1038 DCHECK(Capacity() <= max_capacity_);
1036 1039
1037 p->InsertAfter(anchor_.prev_page()); 1040 p->InsertAfter(anchor_.prev_page());
1038 1041
1039 return true; 1042 return true;
1040 } 1043 }
1041 1044
1042 1045
1043 int PagedSpace::CountTotalPages() { 1046 int PagedSpace::CountTotalPages() {
1044 PageIterator it(this); 1047 PageIterator it(this);
(...skipping 2072 matching lines...) Expand 10 before | Expand all | Expand 10 after
3117 object->ShortPrint(); 3120 object->ShortPrint();
3118 PrintF("\n"); 3121 PrintF("\n");
3119 } 3122 }
3120 printf(" --------------------------------------\n"); 3123 printf(" --------------------------------------\n");
3121 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3124 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3122 } 3125 }
3123 3126
3124 #endif // DEBUG 3127 #endif // DEBUG
3125 } 3128 }
3126 } // namespace v8::internal 3129 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/spaces.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698