diff options
author | Kurt Miller <kurt@cvs.openbsd.org> | 2009-04-21 12:43:02 +0000 |
---|---|---|
committer | Kurt Miller <kurt@cvs.openbsd.org> | 2009-04-21 12:43:02 +0000 |
commit | 48a0ce88ffaff2b978b8b7ead7d4e23112036ed2 (patch) | |
tree | 2d56a3894550e72f51be418f344ecd4b07056cc2 /lib | |
parent | 530321b86c8778ad43eb3d5318c41b32c694a37e (diff) |
Increase default thread stack size to 256K on 32bit archs and 512K on
64bit archs to accommodate the growing number of ports that put large
buffers on the stack. Supported by many with no objections.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libpthread/uthread/pthread_private.h | 9 | ||||
-rw-r--r-- | lib/librthread/rthread.h | 8 |
2 files changed, 13 insertions, 4 deletions
diff --git a/lib/libpthread/uthread/pthread_private.h b/lib/libpthread/uthread/pthread_private.h index 5ed8fab9c08..3f324536d46 100644 --- a/lib/libpthread/uthread/pthread_private.h +++ b/lib/libpthread/uthread/pthread_private.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pthread_private.h,v 1.70 2008/12/18 09:30:32 guenther Exp $ */ +/* $OpenBSD: pthread_private.h,v 1.71 2009/04/21 12:43:01 kurt Exp $ */ /* * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>. * All rights reserved. @@ -388,7 +388,12 @@ enum pthread_susp { /* * Miscellaneous definitions. */ -#define PTHREAD_STACK_DEFAULT 65536 +#ifdef __LP64__ +#define PTHREAD_STACK_DEFAULT (512 * 1024) +#else +#define PTHREAD_STACK_DEFAULT (256 * 1024) +#endif + /* * Maximum size of initial thread's stack. This perhaps deserves to be larger * than the stacks of other threads, since many applications are likely to run diff --git a/lib/librthread/rthread.h b/lib/librthread/rthread.h index 769e513e5fc..7e6bb530683 100644 --- a/lib/librthread/rthread.h +++ b/lib/librthread/rthread.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread.h,v 1.20 2009/02/20 02:38:57 guenther Exp $ */ +/* $OpenBSD: rthread.h,v 1.21 2009/04/21 12:43:01 kurt Exp $ */ /* * Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org> * All Rights Reserved. @@ -28,7 +28,11 @@ #include <sys/queue.h> #include <semaphore.h> -#define RTHREAD_STACK_SIZE_DEF (64 * 1024) +#ifdef __LP64__ +#define RTHREAD_STACK_SIZE_DEF (512 * 1024) +#else +#define RTHREAD_STACK_SIZE_DEF (256 * 1024) +#endif struct stack { void *sp; |