From fd65072f1f3fc43d7f9dbac62b80f752eced24b7 Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Tue, 28 Aug 2001 04:33:21 +0000 Subject: Changed the default stack size to 128 KB. --- src/thread.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/thread.c') 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"); -- cgit v1.2.3