OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 5658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5669 intptr_t Heap::PromotedSpaceSizeOfObjects() { | 5669 intptr_t Heap::PromotedSpaceSizeOfObjects() { |
5670 return old_pointer_space_->SizeOfObjects() | 5670 return old_pointer_space_->SizeOfObjects() |
5671 + old_data_space_->SizeOfObjects() | 5671 + old_data_space_->SizeOfObjects() |
5672 + code_space_->SizeOfObjects() | 5672 + code_space_->SizeOfObjects() |
5673 + map_space_->SizeOfObjects() | 5673 + map_space_->SizeOfObjects() |
5674 + cell_space_->SizeOfObjects() | 5674 + cell_space_->SizeOfObjects() |
5675 + lo_space_->SizeOfObjects(); | 5675 + lo_space_->SizeOfObjects(); |
5676 } | 5676 } |
5677 | 5677 |
5678 | 5678 |
5679 int Heap::PromotedExternalMemorySize() { | 5679 intptr_t Heap::PromotedExternalMemorySize() { |
5680 if (amount_of_external_allocated_memory_ | 5680 if (amount_of_external_allocated_memory_ |
5681 <= amount_of_external_allocated_memory_at_last_global_gc_) return 0; | 5681 <= amount_of_external_allocated_memory_at_last_global_gc_) return 0; |
5682 return amount_of_external_allocated_memory_ | 5682 return amount_of_external_allocated_memory_ |
5683 - amount_of_external_allocated_memory_at_last_global_gc_; | 5683 - amount_of_external_allocated_memory_at_last_global_gc_; |
5684 } | 5684 } |
5685 | 5685 |
5686 #ifdef DEBUG | 5686 #ifdef DEBUG |
5687 | 5687 |
5688 // Tags 0, 1, and 3 are used. Use 2 for marking visited HeapObject. | 5688 // Tags 0, 1, and 3 are used. Use 2 for marking visited HeapObject. |
5689 static const int kMarkTag = 2; | 5689 static const int kMarkTag = 2; |
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6980 } else { | 6980 } else { |
6981 p ^= 0x1d1ed & (Page::kPageSize - 1); // I died. | 6981 p ^= 0x1d1ed & (Page::kPageSize - 1); // I died. |
6982 } | 6982 } |
6983 remembered_unmapped_pages_[remembered_unmapped_pages_index_] = | 6983 remembered_unmapped_pages_[remembered_unmapped_pages_index_] = |
6984 reinterpret_cast<Address>(p); | 6984 reinterpret_cast<Address>(p); |
6985 remembered_unmapped_pages_index_++; | 6985 remembered_unmapped_pages_index_++; |
6986 remembered_unmapped_pages_index_ %= kRememberedUnmappedPages; | 6986 remembered_unmapped_pages_index_ %= kRememberedUnmappedPages; |
6987 } | 6987 } |
6988 | 6988 |
6989 } } // namespace v8::internal | 6989 } } // namespace v8::internal |
OLD | NEW |