OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 // Returns the maximum object size in paged space. | 250 // Returns the maximum object size in paged space. |
251 static inline int MaxObjectSizeInPagedSpace(); | 251 static inline int MaxObjectSizeInPagedSpace(); |
252 | 252 |
253 // Returns of size of all objects residing in the heap. | 253 // Returns of size of all objects residing in the heap. |
254 static int SizeOfObjects(); | 254 static int SizeOfObjects(); |
255 | 255 |
256 // Return the starting address and a mask for the new space. And-masking an | 256 // Return the starting address and a mask for the new space. And-masking an |
257 // address with the mask will result in the start address of the new space | 257 // address with the mask will result in the start address of the new space |
258 // for all addresses in either semispace. | 258 // for all addresses in either semispace. |
259 static Address NewSpaceStart() { return new_space_.start(); } | 259 static Address NewSpaceStart() { return new_space_.start(); } |
260 static uint32_t NewSpaceMask() { return new_space_.mask(); } | 260 static uintptr_t NewSpaceMask() { return new_space_.mask(); } |
261 static Address NewSpaceTop() { return new_space_.top(); } | 261 static Address NewSpaceTop() { return new_space_.top(); } |
262 | 262 |
263 static NewSpace* new_space() { return &new_space_; } | 263 static NewSpace* new_space() { return &new_space_; } |
264 static OldSpace* old_pointer_space() { return old_pointer_space_; } | 264 static OldSpace* old_pointer_space() { return old_pointer_space_; } |
265 static OldSpace* old_data_space() { return old_data_space_; } | 265 static OldSpace* old_data_space() { return old_data_space_; } |
266 static OldSpace* code_space() { return code_space_; } | 266 static OldSpace* code_space() { return code_space_; } |
267 static MapSpace* map_space() { return map_space_; } | 267 static MapSpace* map_space() { return map_space_; } |
268 static CellSpace* cell_space() { return cell_space_; } | 268 static CellSpace* cell_space() { return cell_space_; } |
269 static LargeObjectSpace* lo_space() { return lo_space_; } | 269 static LargeObjectSpace* lo_space() { return lo_space_; } |
270 | 270 |
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 // As VerifyPointersVisitor but also checks that remembered set bits are | 1116 // As VerifyPointersVisitor but also checks that remembered set bits are |
1117 // always set for pointers into new space. | 1117 // always set for pointers into new space. |
1118 class VerifyPointersAndRSetVisitor: public ObjectVisitor { | 1118 class VerifyPointersAndRSetVisitor: public ObjectVisitor { |
1119 public: | 1119 public: |
1120 void VisitPointers(Object** start, Object** end) { | 1120 void VisitPointers(Object** start, Object** end) { |
1121 for (Object** current = start; current < end; current++) { | 1121 for (Object** current = start; current < end; current++) { |
1122 if ((*current)->IsHeapObject()) { | 1122 if ((*current)->IsHeapObject()) { |
1123 HeapObject* object = HeapObject::cast(*current); | 1123 HeapObject* object = HeapObject::cast(*current); |
1124 ASSERT(Heap::Contains(object)); | 1124 ASSERT(Heap::Contains(object)); |
1125 ASSERT(object->map()->IsMap()); | 1125 ASSERT(object->map()->IsMap()); |
1126 #ifndef V8_TARGET_ARCH_X64 | |
1127 if (Heap::InNewSpace(object)) { | 1126 if (Heap::InNewSpace(object)) { |
1128 ASSERT(Page::IsRSetSet(reinterpret_cast<Address>(current), 0)); | 1127 ASSERT(Page::IsRSetSet(reinterpret_cast<Address>(current), 0)); |
1129 } | 1128 } |
1130 #endif | |
1131 } | 1129 } |
1132 } | 1130 } |
1133 } | 1131 } |
1134 }; | 1132 }; |
1135 #endif | 1133 #endif |
1136 | 1134 |
1137 | 1135 |
1138 // Space iterator for iterating over all spaces of the heap. | 1136 // Space iterator for iterating over all spaces of the heap. |
1139 // Returns each space in turn, and null when it is done. | 1137 // Returns each space in turn, and null when it is done. |
1140 class AllSpaces BASE_EMBEDDED { | 1138 class AllSpaces BASE_EMBEDDED { |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1463 int marked_count_; | 1461 int marked_count_; |
1464 | 1462 |
1465 // The count from the end of the previous full GC. Will be zero if there | 1463 // The count from the end of the previous full GC. Will be zero if there |
1466 // was no previous full GC. | 1464 // was no previous full GC. |
1467 int previous_marked_count_; | 1465 int previous_marked_count_; |
1468 }; | 1466 }; |
1469 | 1467 |
1470 } } // namespace v8::internal | 1468 } } // namespace v8::internal |
1471 | 1469 |
1472 #endif // V8_HEAP_H_ | 1470 #endif // V8_HEAP_H_ |
OLD | NEW |