mirror of https://gitee.com/bigwinds/arangodb
Stack size at least 8MB on libmusl. (#4528)
This commit is contained in:
parent
9ffbc908f3
commit
3352be3166
|
@ -140,6 +140,20 @@ ArangoGlobalContext::ArangoGlobalContext(int argc, char* argv[],
|
|||
TRI_GetInstallRoot(TRI_LocateBinaryPath(argv[0]), InstallDirectory)),
|
||||
_ret(EXIT_FAILURE),
|
||||
_useEventLog(true) {
|
||||
#ifndef _WIN32
|
||||
#ifndef __APPLE__
|
||||
#ifndef __GLIBC__
|
||||
// Increase default stack size for libmusl:
|
||||
pthread_attr_t a;
|
||||
memset(&a, 0, sizeof(pthread_attr_t));
|
||||
pthread_attr_setstacksize(&a, 8*1024*1024); // 8MB as in glibc
|
||||
pthread_attr_setguardsize(&a, 4096); // one page
|
||||
pthread_setattr_default_np(&a);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// allow failing memory allocations for the global context thread (i.e. main program thread)
|
||||
TRI_AllowMemoryFailures();
|
||||
|
||||
|
|
Loading…
Reference in New Issue