| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/heap/heap.h" | 5 #include "src/heap/heap.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/ast/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 set_encountered_transition_arrays(Smi::FromInt(0)); | 185 set_encountered_transition_arrays(Smi::FromInt(0)); |
| 186 // Put a dummy entry in the remembered pages so we can find the list the | 186 // Put a dummy entry in the remembered pages so we can find the list the |
| 187 // minidump even if there are no real unmapped pages. | 187 // minidump even if there are no real unmapped pages. |
| 188 RememberUnmappedPage(NULL, false); | 188 RememberUnmappedPage(NULL, false); |
| 189 } | 189 } |
| 190 | 190 |
| 191 | 191 |
| 192 intptr_t Heap::Capacity() { | 192 intptr_t Heap::Capacity() { |
| 193 if (!HasBeenSetUp()) return 0; | 193 if (!HasBeenSetUp()) return 0; |
| 194 | 194 |
| 195 return new_space_.Capacity() + old_space_->Capacity() + | 195 return new_space_.Capacity() + OldGenerationCapacity(); |
| 196 code_space_->Capacity() + map_space_->Capacity(); | 196 } |
| 197 |
| 198 intptr_t Heap::OldGenerationCapacity() { |
| 199 if (!HasBeenSetUp()) return 0; |
| 200 |
| 201 return old_space_->Capacity() + code_space_->Capacity() + |
| 202 map_space_->Capacity() + lo_space_->SizeOfObjects(); |
| 197 } | 203 } |
| 198 | 204 |
| 199 | 205 |
| 200 intptr_t Heap::CommittedOldGenerationMemory() { | 206 intptr_t Heap::CommittedOldGenerationMemory() { |
| 201 if (!HasBeenSetUp()) return 0; | 207 if (!HasBeenSetUp()) return 0; |
| 202 | 208 |
| 203 return old_space_->CommittedMemory() + code_space_->CommittedMemory() + | 209 return old_space_->CommittedMemory() + code_space_->CommittedMemory() + |
| 204 map_space_->CommittedMemory() + lo_space_->Size(); | 210 map_space_->CommittedMemory() + lo_space_->Size(); |
| 205 } | 211 } |
| 206 | 212 |
| (...skipping 6269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6476 } | 6482 } |
| 6477 | 6483 |
| 6478 | 6484 |
| 6479 // static | 6485 // static |
| 6480 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6486 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6481 return StaticVisitorBase::GetVisitorId(map); | 6487 return StaticVisitorBase::GetVisitorId(map); |
| 6482 } | 6488 } |
| 6483 | 6489 |
| 6484 } // namespace internal | 6490 } // namespace internal |
| 6485 } // namespace v8 | 6491 } // namespace v8 |
| OLD | NEW |