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 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 return old_generation_allocation_limit_ - PromotedTotalSize(); | 1077 return old_generation_allocation_limit_ - PromotedTotalSize(); |
1078 } | 1078 } |
1079 | 1079 |
1080 inline intptr_t OldGenerationCapacityAvailable() { | 1080 inline intptr_t OldGenerationCapacityAvailable() { |
1081 return max_old_generation_size_ - PromotedTotalSize(); | 1081 return max_old_generation_size_ - PromotedTotalSize(); |
1082 } | 1082 } |
1083 | 1083 |
1084 static const intptr_t kMinimumOldGenerationAllocationLimit = | 1084 static const intptr_t kMinimumOldGenerationAllocationLimit = |
1085 8 * (Page::kPageSize > MB ? Page::kPageSize : MB); | 1085 8 * (Page::kPageSize > MB ? Page::kPageSize : MB); |
1086 | 1086 |
1087 static const int kInitalOldGenerationLimitFactor = 7; | 1087 static const int kInitalOldGenerationLimitFactor = 2; |
1088 | 1088 |
1089 static const int kPointerMultiplier = i::kPointerSize / 4; | 1089 static const int kPointerMultiplier = i::kPointerSize / 4; |
1090 | 1090 |
1091 // The new space size has to be a power of 2. Sizes are in MB. | 1091 // The new space size has to be a power of 2. Sizes are in MB. |
1092 static const int kMaxSemiSpaceSizeLowMemoryDevice = 1 * kPointerMultiplier; | 1092 static const int kMaxSemiSpaceSizeLowMemoryDevice = 1 * kPointerMultiplier; |
1093 static const int kMaxSemiSpaceSizeMediumMemoryDevice = 4 * kPointerMultiplier; | 1093 static const int kMaxSemiSpaceSizeMediumMemoryDevice = 4 * kPointerMultiplier; |
1094 static const int kMaxSemiSpaceSizeHighMemoryDevice = 8 * kPointerMultiplier; | 1094 static const int kMaxSemiSpaceSizeHighMemoryDevice = 8 * kPointerMultiplier; |
1095 static const int kMaxSemiSpaceSizeHugeMemoryDevice = 8 * kPointerMultiplier; | 1095 static const int kMaxSemiSpaceSizeHugeMemoryDevice = 8 * kPointerMultiplier; |
1096 | 1096 |
1097 // The old space size has to be a multiple of Page::kPageSize. | 1097 // The old space size has to be a multiple of Page::kPageSize. |
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2571 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2571 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2572 | 2572 |
2573 private: | 2573 private: |
2574 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2574 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2575 }; | 2575 }; |
2576 #endif // DEBUG | 2576 #endif // DEBUG |
2577 } | 2577 } |
2578 } // namespace v8::internal | 2578 } // namespace v8::internal |
2579 | 2579 |
2580 #endif // V8_HEAP_HEAP_H_ | 2580 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |