diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2001-08-28 04:33:21 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2001-08-28 04:33:21 +0000 |
commit | fd65072f1f3fc43d7f9dbac62b80f752eced24b7 (patch) | |
tree | fef8ca37eaf004c25928926af325d2a396df80c9 /src/thread.c | |
parent | f9d0fcd1a2bfd55fa092080cb920be6e12601bb1 (diff) | |
download | tinyproxy-fd65072f1f3fc43d7f9dbac62b80f752eced24b7.tar.gz tinyproxy-fd65072f1f3fc43d7f9dbac62b80f752eced24b7.zip |
Changed the default stack size to 128 KB.
Diffstat (limited to '')
-rw-r--r-- | src/thread.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/thread.c b/src/thread.c index c2e736b..e84cf30 100644 --- a/src/thread.c +++ b/src/thread.c @@ -1,4 +1,4 @@ -/* $Id: thread.c,v 1.7 2001-08-27 17:45:50 rjkaes Exp $ +/* $Id: thread.c,v 1.8 2001-08-28 04:33:21 rjkaes Exp $ * * Handles the creation/destruction of the various threads required for * processing incoming connections. @@ -23,6 +23,12 @@ #include "sock.h" #include "thread.h" +/* + * This is the stack frame size used by all the threads. We'll start by + * setting it to 128 KB. + */ +#define THREAD_STACK_SIZE (1024 * 128) + static int listenfd; static socklen_t addrlen; @@ -154,7 +160,7 @@ int thread_pool_create(void) * because the default on some OS's is too small. */ pthread_attr_init(&thread_attr); - pthread_attr_setstacksize(&thread_attr, (1024 * 1024)); + pthread_attr_setstacksize(&thread_attr, THREAD_STACK_SIZE); if (thread_config.maxclients == 0) { log_message(LOG_ERR, "You must set MaxClients to a value greater than 0"); |