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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 | 815 |
816 Address* OldSpaceAllocationTopAddress() { | 816 Address* OldSpaceAllocationTopAddress() { |
817 return old_space_->allocation_top_address(); | 817 return old_space_->allocation_top_address(); |
818 } | 818 } |
819 Address* OldSpaceAllocationLimitAddress() { | 819 Address* OldSpaceAllocationLimitAddress() { |
820 return old_space_->allocation_limit_address(); | 820 return old_space_->allocation_limit_address(); |
821 } | 821 } |
822 | 822 |
823 // TODO(hpayer): There is still a missmatch between capacity and actual | 823 // TODO(hpayer): There is still a missmatch between capacity and actual |
824 // committed memory size. | 824 // committed memory size. |
825 bool CanExpandOldGeneration(int size) { | 825 bool CanExpandOldGeneration(int size = 0) { |
826 if (force_oom_) return false; | 826 if (force_oom_) return false; |
827 return (CommittedOldGenerationMemory() + size) < MaxOldGenerationSize(); | 827 return (CommittedOldGenerationMemory() + size) < MaxOldGenerationSize(); |
828 } | 828 } |
829 | 829 |
830 // Clear the Instanceof cache (used when a prototype changes). | 830 // Clear the Instanceof cache (used when a prototype changes). |
831 inline void ClearInstanceofCache(); | 831 inline void ClearInstanceofCache(); |
832 | 832 |
833 // FreeSpace objects have a null map after deserialization. Update the map. | 833 // FreeSpace objects have a null map after deserialization. Update the map. |
834 void RepairFreeListsAfterDeserialization(); | 834 void RepairFreeListsAfterDeserialization(); |
835 | 835 |
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2755 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2755 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2756 | 2756 |
2757 private: | 2757 private: |
2758 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2758 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2759 }; | 2759 }; |
2760 #endif // DEBUG | 2760 #endif // DEBUG |
2761 } // namespace internal | 2761 } // namespace internal |
2762 } // namespace v8 | 2762 } // namespace v8 |
2763 | 2763 |
2764 #endif // V8_HEAP_HEAP_H_ | 2764 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |