mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 10:35:40 +08:00
Reduce stack usage for threads
Reduce stack usage, because large logging buffers are removed from stack.
This commit is contained in:
parent
7df2461a26
commit
9876172e0b
@ -173,7 +173,7 @@ int MODULEMAINFUNC (int argc, char** argv){
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
||||
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);
|
||||
#endif
|
||||
#endif
|
||||
@ -601,7 +601,7 @@ int MODULEMAINFUNC (int argc, char** argv){
|
||||
#ifndef _WINCE
|
||||
h = (HANDLE)_beginthreadex((LPSECURITY_ATTRIBUTES )NULL, (unsigned)16384, threadfunc, (void *) newparam, 0, &thread);
|
||||
#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
|
||||
srv.childcount++;
|
||||
if (h) {
|
||||
|
Loading…
Reference in New Issue
Block a user