Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: src/globals.h

Issue 2085893002: [heap] Internalize kExternalAllocationLimit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Initialize limit Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/extensions/statistics-extension.cc ('k') | src/heap/array-buffer-tracker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/extensions/statistics-extension.cc ('k') | src/heap/array-buffer-tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698