DefaultThreadStackSize

DefaultThreadStackSize

#Overview

name: DefaultThreadStackSize

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 1 C++ source file.

#Summary

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:1452, section: [Core.System]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Unix/UnixForkPageProtector.cpp:743

Scope (from outer to inner):

file
namespace    UE
function     int pthread_create

Source code excerpt:

			// pthreads normal default thread size is 8MB, lets stay default there but use our own stackbase
			// this memory is cached under the hood in nptl pthreads so we no longer will own this memory, and is undefined to free once passed through
			static int DefaultThreadStackSize = 1024 * 1024 * 8;
			void* Stackbase = malloc(DefaultThreadStackSize);

			pthread_attr_init(&ThreadAttr);
			pthread_attr_setstack(&ThreadAttr, Stackbase, DefaultThreadStackSize);

			int PThreadRet = RealPThreadCreate(thread, &ThreadAttr, start_routine, arg);

			pthread_attr_destroy(&ThreadAttr);

			return PThreadRet;