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 #ifndef V8_HEAP_SPACES_H_ | 5 #ifndef V8_HEAP_SPACES_H_ |
6 #define V8_HEAP_SPACES_H_ | 6 #define V8_HEAP_SPACES_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 3074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3085 void ReportStatistics(); | 3085 void ReportStatistics(); |
3086 #endif | 3086 #endif |
3087 | 3087 |
3088 private: | 3088 private: |
3089 // The head of the linked list of large object chunks. | 3089 // The head of the linked list of large object chunks. |
3090 LargePage* first_page_; | 3090 LargePage* first_page_; |
3091 intptr_t size_; // allocated bytes | 3091 intptr_t size_; // allocated bytes |
3092 int page_count_; // number of chunks | 3092 int page_count_; // number of chunks |
3093 intptr_t objects_size_; // size of objects | 3093 intptr_t objects_size_; // size of objects |
3094 // Map MemoryChunk::kAlignment-aligned chunks to large pages covering them | 3094 // Map MemoryChunk::kAlignment-aligned chunks to large pages covering them |
3095 HashMap chunk_map_; | 3095 base::HashMap chunk_map_; |
3096 | 3096 |
3097 friend class LargeObjectIterator; | 3097 friend class LargeObjectIterator; |
3098 }; | 3098 }; |
3099 | 3099 |
3100 | 3100 |
3101 class LargeObjectIterator : public ObjectIterator { | 3101 class LargeObjectIterator : public ObjectIterator { |
3102 public: | 3102 public: |
3103 explicit LargeObjectIterator(LargeObjectSpace* space); | 3103 explicit LargeObjectIterator(LargeObjectSpace* space); |
3104 | 3104 |
3105 HeapObject* Next(); | 3105 HeapObject* Next(); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3156 count = 0; | 3156 count = 0; |
3157 } | 3157 } |
3158 // Must be small, since an iteration is used for lookup. | 3158 // Must be small, since an iteration is used for lookup. |
3159 static const int kMaxComments = 64; | 3159 static const int kMaxComments = 64; |
3160 }; | 3160 }; |
3161 #endif | 3161 #endif |
3162 } // namespace internal | 3162 } // namespace internal |
3163 } // namespace v8 | 3163 } // namespace v8 |
3164 | 3164 |
3165 #endif // V8_HEAP_SPACES_H_ | 3165 #endif // V8_HEAP_SPACES_H_ |
OLD | NEW |