| 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/full-codegen.h" | 9 #include "src/full-codegen/full-codegen.h" |
| 10 #include "src/heap/mark-compact.h" | 10 #include "src/heap/mark-compact.h" |
| (...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 } | 913 } |
| 914 vm->Uncommit(header, header_size); | 914 vm->Uncommit(header, header_size); |
| 915 } | 915 } |
| 916 return false; | 916 return false; |
| 917 } | 917 } |
| 918 | 918 |
| 919 | 919 |
| 920 // ----------------------------------------------------------------------------- | 920 // ----------------------------------------------------------------------------- |
| 921 // MemoryChunk implementation | 921 // MemoryChunk implementation |
| 922 | 922 |
| 923 void MemoryChunk::IncrementLiveBytesFromMutator(Address address, int by) { | 923 void MemoryChunk::IncrementLiveBytesFromMutator(HeapObject* object, int by) { |
| 924 MemoryChunk* chunk = MemoryChunk::FromAddress(address); | 924 MemoryChunk* chunk = MemoryChunk::FromAddress(object->address()); |
| 925 if (!chunk->InNewSpace() && !static_cast<Page*>(chunk)->WasSwept()) { | 925 if (!chunk->InNewSpace() && !static_cast<Page*>(chunk)->WasSwept()) { |
| 926 static_cast<PagedSpace*>(chunk->owner())->IncrementUnsweptFreeBytes(-by); | 926 static_cast<PagedSpace*>(chunk->owner())->IncrementUnsweptFreeBytes(-by); |
| 927 } | 927 } |
| 928 chunk->IncrementLiveBytes(by); | 928 chunk->IncrementLiveBytes(by); |
| 929 } | 929 } |
| 930 | 930 |
| 931 | 931 |
| 932 // ----------------------------------------------------------------------------- | 932 // ----------------------------------------------------------------------------- |
| 933 // PagedSpace implementation | 933 // PagedSpace implementation |
| 934 | 934 |
| (...skipping 2206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3141 object->ShortPrint(); | 3141 object->ShortPrint(); |
| 3142 PrintF("\n"); | 3142 PrintF("\n"); |
| 3143 } | 3143 } |
| 3144 printf(" --------------------------------------\n"); | 3144 printf(" --------------------------------------\n"); |
| 3145 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3145 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 3146 } | 3146 } |
| 3147 | 3147 |
| 3148 #endif // DEBUG | 3148 #endif // DEBUG |
| 3149 } // namespace internal | 3149 } // namespace internal |
| 3150 } // namespace v8 | 3150 } // namespace v8 |
| OLD | NEW |