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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 // given alignment. | 559 // given alignment. |
560 static int GetMaximumFillToAlign(AllocationAlignment alignment); | 560 static int GetMaximumFillToAlign(AllocationAlignment alignment); |
561 // Calculates the actual amount of filler required for a given address at the | 561 // Calculates the actual amount of filler required for a given address at the |
562 // given alignment. | 562 // given alignment. |
563 static int GetFillToAlign(Address address, AllocationAlignment alignment); | 563 static int GetFillToAlign(Address address, AllocationAlignment alignment); |
564 | 564 |
565 template <typename T> | 565 template <typename T> |
566 static inline bool IsOneByte(T t, int chars); | 566 static inline bool IsOneByte(T t, int chars); |
567 | 567 |
568 static void FatalProcessOutOfMemory(const char* location, | 568 static void FatalProcessOutOfMemory(const char* location, |
569 bool take_snapshot = false); | 569 bool is_heap_oom = false); |
570 | 570 |
571 static bool RootIsImmortalImmovable(int root_index); | 571 static bool RootIsImmortalImmovable(int root_index); |
572 | 572 |
573 // Checks whether the space is valid. | 573 // Checks whether the space is valid. |
574 static bool IsValidAllocationSpace(AllocationSpace space); | 574 static bool IsValidAllocationSpace(AllocationSpace space); |
575 | 575 |
576 // Generated code can embed direct references to non-writable roots if | 576 // Generated code can embed direct references to non-writable roots if |
577 // they are in new space. | 577 // they are in new space. |
578 static bool RootCanBeWrittenAfterInitialization(RootListIndex root_index); | 578 static bool RootCanBeWrittenAfterInitialization(RootListIndex root_index); |
579 | 579 |
(...skipping 2081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2661 friend class LargeObjectSpace; | 2661 friend class LargeObjectSpace; |
2662 friend class NewSpace; | 2662 friend class NewSpace; |
2663 friend class PagedSpace; | 2663 friend class PagedSpace; |
2664 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2664 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2665 }; | 2665 }; |
2666 | 2666 |
2667 } // namespace internal | 2667 } // namespace internal |
2668 } // namespace v8 | 2668 } // namespace v8 |
2669 | 2669 |
2670 #endif // V8_HEAP_HEAP_H_ | 2670 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |