| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |