summaryrefslogtreecommitdiff
path: root/user/qt5-qtwebkit/jsc-musl.patch
blob: 0165f21dc256e28c54283860a4b2b41b2116595f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--- a/Source/JavaScriptCore/runtime/Options.h	2020-04-14 00:51:51.000000000 +0200
+++ b/Source/JavaScriptCore/runtime/Options.h	2020-04-14 00:51:51.000000000 +0200
@@ -40,6 +40,16 @@
 
 namespace JSC {
 
+#if defined(__GLIBC__)
+constexpr unsigned jscMaxPerThreadStack = 4 * MB;
+constexpr unsigned jscSoftReservedZoneSize = 128 * KB;
+constexpr unsigned jscReservedZoneSize = 64 * KB;
+#else
+constexpr unsigned jscMaxPerThreadStack = 80 * KB;
+constexpr unsigned jscSoftReservedZoneSize = 32 * KB;
+constexpr unsigned jscReservedZoneSize = 16 * KB;
+#endif
+
 // How do JSC VM options work?
 // ===========================
 // The JSC_OPTIONS() macro below defines a list of all JSC options in use,
@@ -112,9 +122,9 @@
     \
     v(bool, reportMustSucceedExecutableAllocations, false, nullptr) \
     \
-    v(unsigned, maxPerThreadStackUsage, 4 * MB, nullptr) \
-    v(unsigned, reservedZoneSize, 128 * KB, nullptr) \
-    v(unsigned, errorModeReservedZoneSize, 64 * KB, nullptr) \
+    v(unsigned, maxPerThreadStackUsage, jscMaxPerThreadStack, nullptr) \
+    v(unsigned, reservedZoneSize, jscSoftReservedZoneSize, nullptr) \
+    v(unsigned, errorModeReservedZoneSize, jscReservedZoneSize, nullptr) \
     \
     v(bool, crashIfCantAllocateJITMemory, false, nullptr) \
     v(unsigned, jitMemoryReservationSize, 0, "Set this number to change the executable allocation size in ExecutableAllocatorFixedVMPool. (In bytes.)") \