Reduce stack usage for threads

Reduce stack usage, because large logging buffers are removed from
stack.
This commit is contained in:
z3APA3A 2015-12-27 19:43:04 +03:00
parent 7df2461a26
commit 9876172e0b

View File

@ -173,7 +173,7 @@ int MODULEMAINFUNC (int argc, char** argv){
signal(SIGPIPE, SIG_IGN); signal(SIGPIPE, SIG_IGN);
pthread_attr_init(&pa); pthread_attr_init(&pa);
pthread_attr_setstacksize(&pa,PTHREAD_STACK_MIN + 16384); pthread_attr_setstacksize(&pa,PTHREAD_STACK_MIN + 8192);
pthread_attr_setdetachstate(&pa,PTHREAD_CREATE_DETACHED); pthread_attr_setdetachstate(&pa,PTHREAD_CREATE_DETACHED);
#endif #endif
#endif #endif
@ -601,7 +601,7 @@ int MODULEMAINFUNC (int argc, char** argv){
#ifndef _WINCE #ifndef _WINCE
h = (HANDLE)_beginthreadex((LPSECURITY_ATTRIBUTES )NULL, (unsigned)16384, threadfunc, (void *) newparam, 0, &thread); h = (HANDLE)_beginthreadex((LPSECURITY_ATTRIBUTES )NULL, (unsigned)16384, threadfunc, (void *) newparam, 0, &thread);
#else #else
h = (HANDLE)CreateThread((LPSECURITY_ATTRIBUTES )NULL, (unsigned)32768, threadfunc, (void *) newparam, 0, &thread); h = (HANDLE)CreateThread((LPSECURITY_ATTRIBUTES )NULL, (unsigned)16384, threadfunc, (void *) newparam, 0, &thread);
#endif #endif
srv.childcount++; srv.childcount++;
if (h) { if (h) {