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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 const size_t kCodeRangeAreaAlignment = 64 * KB; // OS page on PPC Linux | 186 const size_t kCodeRangeAreaAlignment = 64 * KB; // OS page on PPC Linux |
187 #else | 187 #else |
188 const bool kRequiresCodeRange = false; | 188 const bool kRequiresCodeRange = false; |
189 const size_t kMaximalCodeRangeSize = 0 * MB; | 189 const size_t kMaximalCodeRangeSize = 0 * MB; |
190 const size_t kMinimumCodeRangeSize = 0 * MB; | 190 const size_t kMinimumCodeRangeSize = 0 * MB; |
191 const size_t kCodeRangeAreaAlignment = 4 * KB; // OS page. | 191 const size_t kCodeRangeAreaAlignment = 4 * KB; // OS page. |
192 #endif | 192 #endif |
193 const size_t kReservedCodeRangePages = 0; | 193 const size_t kReservedCodeRangePages = 0; |
194 #endif | 194 #endif |
195 | 195 |
196 // The external allocation limit should be below 256 MB on all architectures | 196 // Trigger an incremental GCs once the external memory reaches this limit. |
197 // to avoid that resource-constrained embedders run low on memory. | 197 const int kExternalAllocationSoftLimit = 64 * MB; |
198 const int kExternalAllocationLimit = 192 * 1024 * 1024; | |
199 | 198 |
200 STATIC_ASSERT(kPointerSize == (1 << kPointerSizeLog2)); | 199 STATIC_ASSERT(kPointerSize == (1 << kPointerSizeLog2)); |
201 | 200 |
202 const int kBitsPerByte = 8; | 201 const int kBitsPerByte = 8; |
203 const int kBitsPerByteLog2 = 3; | 202 const int kBitsPerByteLog2 = 3; |
204 const int kBitsPerPointer = kPointerSize * kBitsPerByte; | 203 const int kBitsPerPointer = kPointerSize * kBitsPerByte; |
205 const int kBitsPerInt = kIntSize * kBitsPerByte; | 204 const int kBitsPerInt = kIntSize * kBitsPerByte; |
206 | 205 |
207 // IEEE 754 single precision floating point number bit layout. | 206 // IEEE 754 single precision floating point number bit layout. |
208 const uint32_t kBinary32SignMask = 0x80000000u; | 207 const uint32_t kBinary32SignMask = 0x80000000u; |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1151 public: | 1150 public: |
1152 enum { kNone = 0x00, kSignedSmall = 0x01, kNumber = 0x3, kAny = 0x7 }; | 1151 enum { kNone = 0x00, kSignedSmall = 0x01, kNumber = 0x3, kAny = 0x7 }; |
1153 }; | 1152 }; |
1154 | 1153 |
1155 } // namespace internal | 1154 } // namespace internal |
1156 } // namespace v8 | 1155 } // namespace v8 |
1157 | 1156 |
1158 namespace i = v8::internal; | 1157 namespace i = v8::internal; |
1159 | 1158 |
1160 #endif // V8_GLOBALS_H_ | 1159 #endif // V8_GLOBALS_H_ |
OLD | NEW |