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 #ifndef V8_HEAP_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1633 static const int kAllocationSiteScratchpadSize = 256; | 1633 static const int kAllocationSiteScratchpadSize = 256; |
1634 | 1634 |
1635 Heap(); | 1635 Heap(); |
1636 | 1636 |
1637 static String* UpdateNewSpaceReferenceInExternalStringTableEntry( | 1637 static String* UpdateNewSpaceReferenceInExternalStringTableEntry( |
1638 Heap* heap, Object** pointer); | 1638 Heap* heap, Object** pointer); |
1639 | 1639 |
1640 static void ScavengeStoreBufferCallback(Heap* heap, MemoryChunk* page, | 1640 static void ScavengeStoreBufferCallback(Heap* heap, MemoryChunk* page, |
1641 StoreBufferEvent event); | 1641 StoreBufferEvent event); |
1642 | 1642 |
1643 // Selects the proper allocation space based on the pretenuring decision. | 1643 // Selects the proper allocation space depending on the given object |
1644 static AllocationSpace SelectSpace(PretenureFlag pretenure) { | 1644 // size and pretenuring decision. |
| 1645 static AllocationSpace SelectSpace(int object_size, PretenureFlag pretenure) { |
| 1646 if (object_size > Page::kMaxRegularHeapObjectSize) return LO_SPACE; |
1645 return (pretenure == TENURED) ? OLD_SPACE : NEW_SPACE; | 1647 return (pretenure == TENURED) ? OLD_SPACE : NEW_SPACE; |
1646 } | 1648 } |
1647 | 1649 |
1648 #define ROOT_ACCESSOR(type, name, camel_name) \ | 1650 #define ROOT_ACCESSOR(type, name, camel_name) \ |
1649 inline void set_##name(type* value); | 1651 inline void set_##name(type* value); |
1650 ROOT_LIST(ROOT_ACCESSOR) | 1652 ROOT_LIST(ROOT_ACCESSOR) |
1651 #undef ROOT_ACCESSOR | 1653 #undef ROOT_ACCESSOR |
1652 | 1654 |
1653 StoreBuffer* store_buffer() { return &store_buffer_; } | 1655 StoreBuffer* store_buffer() { return &store_buffer_; } |
1654 | 1656 |
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2698 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2700 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2699 | 2701 |
2700 private: | 2702 private: |
2701 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2703 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2702 }; | 2704 }; |
2703 #endif // DEBUG | 2705 #endif // DEBUG |
2704 } | 2706 } |
2705 } // namespace v8::internal | 2707 } // namespace v8::internal |
2706 | 2708 |
2707 #endif // V8_HEAP_HEAP_H_ | 2709 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |