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

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

Issue 949623006: Attach snapshot data blob to the isolate. (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/heap.cc ('k') | src/isolate.h » ('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 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 return true; 1032 return true;
1033 } 1033 }
1034 1034
1035 1035
1036 bool PagedSpace::Expand() { 1036 bool PagedSpace::Expand() {
1037 if (!CanExpand()) return false; 1037 if (!CanExpand()) return false;
1038 1038
1039 intptr_t size = AreaSize(); 1039 intptr_t size = AreaSize();
1040 1040
1041 if (anchor_.next_page() == &anchor_) { 1041 if (anchor_.next_page() == &anchor_) {
1042 size = Snapshot::SizeOfFirstPage(identity()); 1042 size = Snapshot::SizeOfFirstPage(heap()->isolate(), identity());
1043 } 1043 }
1044 1044
1045 Page* p = heap()->isolate()->memory_allocator()->AllocatePage(size, this, 1045 Page* p = heap()->isolate()->memory_allocator()->AllocatePage(size, this,
1046 executable()); 1046 executable());
1047 if (p == NULL) return false; 1047 if (p == NULL) return false;
1048 1048
1049 // Pages created during bootstrapping may contain immortal immovable objects. 1049 // Pages created during bootstrapping may contain immortal immovable objects.
1050 if (!heap()->deserialization_complete()) p->MarkNeverEvacuate(); 1050 if (!heap()->deserialization_complete()) p->MarkNeverEvacuate();
1051 1051
1052 DCHECK(Capacity() <= max_capacity_); 1052 DCHECK(Capacity() <= max_capacity_);
(...skipping 2086 matching lines...) Expand 10 before | Expand all | Expand 10 after
3139 object->ShortPrint(); 3139 object->ShortPrint();
3140 PrintF("\n"); 3140 PrintF("\n");
3141 } 3141 }
3142 printf(" --------------------------------------\n"); 3142 printf(" --------------------------------------\n");
3143 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3143 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3144 } 3144 }
3145 3145
3146 #endif // DEBUG 3146 #endif // DEBUG
3147 } 3147 }
3148 } // namespace v8::internal 3148 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698