about summary refs log tree commit homepage
path: root/thrpool.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-02-11 07:28:45 +0000
committerEric Wong <normalperson@yhbt.net>2012-02-11 07:30:55 +0000
commitaba0194feafb3765ee86cfb40e5d7c7607c8aa42 (patch)
tree8f0cab39a7a5524bdbb7aa39b742c1fa7e1c683b /thrpool.c
parentc103886fadfc54360093964d658b44403cf2df9b (diff)
downloadcmogstored-aba0194feafb3765ee86cfb40e5d7c7607c8aa42.tar.gz
BUFSIZ is only 1024 on FreeBSD, this is too small to be
optimal for large I/O operations.
Diffstat (limited to 'thrpool.c')
-rw-r--r--thrpool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thrpool.c b/thrpool.c
index 2bc276f..593993b 100644
--- a/thrpool.c
+++ b/thrpool.c
@@ -9,7 +9,7 @@
  * We also use syslog() and *printf() functions which take a lot of
  * stack under glibc, so we'll add BUFSIZ (8192 on glibc) to that
  */
-#define MOG_THR_STACK_SIZE ((16 * 1024) + BUFSIZ)
+#define MOG_THR_STACK_SIZE ((16 * 1024) + MAX(8192,BUFSIZ))
 
 #if defined(PTHREAD_STACK_MIN) && (PTHREAD_STACK_MIN > MOG_THR_STACK_SIZE)
 #  undef MOG_THR_STACK_SIZE