| 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_GLOBALS_H_ | 5 #ifndef V8_GLOBALS_H_ |
| 6 #define V8_GLOBALS_H_ | 6 #define V8_GLOBALS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 const size_t kCodeRangeAreaAlignment = 4 * KB; // OS page. | 175 const size_t kCodeRangeAreaAlignment = 4 * KB; // OS page. |
| 176 #else | 176 #else |
| 177 const bool kRequiresCodeRange = false; | 177 const bool kRequiresCodeRange = false; |
| 178 const size_t kMaximalCodeRangeSize = 0 * MB; | 178 const size_t kMaximalCodeRangeSize = 0 * MB; |
| 179 const size_t kMinimumCodeRangeSize = 0 * MB; | 179 const size_t kMinimumCodeRangeSize = 0 * MB; |
| 180 const size_t kReservedCodeRangePages = 0; | 180 const size_t kReservedCodeRangePages = 0; |
| 181 const size_t kCodeRangeAreaAlignment = 4 * KB; // OS page. | 181 const size_t kCodeRangeAreaAlignment = 4 * KB; // OS page. |
| 182 #endif | 182 #endif |
| 183 #endif | 183 #endif |
| 184 | 184 |
| 185 // The external allocation limit should be below 256 MB on all architectures |
| 186 // to avoid that resource-constrained embedders run low on memory. |
| 187 const int kExternalAllocationLimit = 192 * 1024 * 1024; |
| 188 |
| 185 STATIC_ASSERT(kPointerSize == (1 << kPointerSizeLog2)); | 189 STATIC_ASSERT(kPointerSize == (1 << kPointerSizeLog2)); |
| 186 | 190 |
| 187 const int kBitsPerByte = 8; | 191 const int kBitsPerByte = 8; |
| 188 const int kBitsPerByteLog2 = 3; | 192 const int kBitsPerByteLog2 = 3; |
| 189 const int kBitsPerPointer = kPointerSize * kBitsPerByte; | 193 const int kBitsPerPointer = kPointerSize * kBitsPerByte; |
| 190 const int kBitsPerInt = kIntSize * kBitsPerByte; | 194 const int kBitsPerInt = kIntSize * kBitsPerByte; |
| 191 | 195 |
| 192 // IEEE 754 single precision floating point number bit layout. | 196 // IEEE 754 single precision floating point number bit layout. |
| 193 const uint32_t kBinary32SignMask = 0x80000000u; | 197 const uint32_t kBinary32SignMask = 0x80000000u; |
| 194 const uint32_t kBinary32ExponentMask = 0x7f800000u; | 198 const uint32_t kBinary32ExponentMask = 0x7f800000u; |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1089 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> | 1093 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> |
| 1090 kPointerSizeLog2); | 1094 kPointerSizeLog2); |
| 1091 } | 1095 } |
| 1092 | 1096 |
| 1093 } // namespace internal | 1097 } // namespace internal |
| 1094 } // namespace v8 | 1098 } // namespace v8 |
| 1095 | 1099 |
| 1096 namespace i = v8::internal; | 1100 namespace i = v8::internal; |
| 1097 | 1101 |
| 1098 #endif // V8_GLOBALS_H_ | 1102 #endif // V8_GLOBALS_H_ |
| OLD | NEW |