summaryrefslogtreecommitdiff
path: root/experimental/qt5-qtwebkit/musl-thread-stacksize.patch
blob: e790222dc123d418aa3bf8890cb3624a7d3e8acd (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--- qtwebkit-5.212.0-alpha2/Source/WTF/wtf/ThreadingPthreads.cpp.old	2017-06-04 15:16:06.000000000 -0500
+++ qtwebkit-5.212.0-alpha2/Source/WTF/wtf/ThreadingPthreads.cpp	2018-09-05 02:29:45.980000000 +0000
@@ -107,10 +107,11 @@
 void initializeThreading()
 {
     static bool isInitialized;
+    pthread_attr_t attr;
 
     if (isInitialized)
         return;

     isInitialized = true;
 
     WTF::double_conversion::initialize();
@@ -122,6 +122,11 @@
     ThreadIdentifierData::initializeOnce();
     wtfThreadData();
     initializeDates();
+
+    pthread_attr_init(&attr);
+    pthread_attr_setstacksize(&attr, 2097152);
+    pthread_setattr_default_np(&attr);
+    pthread_attr_destroy(&attr);
 }
 
 static ThreadMap& threadMap()
@@ -171,6 +171,7 @@
     pthread_t threadHandle;
     pthread_attr_t attr;
     pthread_attr_init(&attr);
+    pthread_attr_setstacksize(&attr, 2097152);
 #if HAVE(QOS_CLASSES)
     pthread_attr_set_qos_class_np(&attr, QOS_CLASS_USER_INITIATED, 0);
 #endif
--- qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/runtime/Options.h.old	2017-06-04 20:16:05.000000000 +0000
+++ qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/runtime/Options.h	2018-09-26 03:02:39.700000000 +0000
@@ -112,9 +112,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, 512 * KB, nullptr) \
+    v(unsigned, reservedZoneSize, 32 * KB, nullptr) \
+    v(unsigned, errorModeReservedZoneSize, 16 * KB, nullptr) \
     \
     v(bool, crashIfCantAllocateJITMemory, false, nullptr) \
     v(unsigned, jitMemoryReservationSize, 0, "Set this number to change the executable allocation size in ExecutableAllocatorFixedVMPool. (In bytes.)") \