This is an automated email from the ASF dual-hosted git repository.
amc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 9e38ee8 Make the default thread stack size global and
configurable.
9e38ee8 is described below
commit 9e38ee80cdba0292d20b38066ba4e9f51af10a3d
Author: Alan M. Carroll <[email protected]>
AuthorDate: Tue May 30 10:41:17 2017 -0500
Make the default thread stack size global and configurable.
---
configure.ac | 11 +++++++++++
iocore/eventsystem/I_Thread.h | 1 -
lib/ts/ink_config.h.in | 2 ++
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 2c3fae6..2c5c518 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1859,6 +1859,17 @@ AS_IF([test "x$enable_experimental_plugins" = "xyes"],
AM_CONDITIONAL([BUILD_REMAP_STATS_PLUGIN],
[ test "x$enable_experimental_plugins" = "xyes" -a "x$ac_cv_header_search_h"
= "xyes" -a "x$ac_cv_type_struct_hsearch_data" = "xyes" -a
"x$ac_cv_func_hcreate_r" = "xyes" -a "x$ac_cv_func_hsearch_r" = "xyes" ])
+AC_ARG_WITH([default-stack-size],
+ [AS_HELP_STRING([--with-default-stack-size],[specify the default stack size
in bytes [default=1048576]])],
+ [
+ with_default_stack_size="$withval"
+ ],[
+ with_default_stack_size="1048576"
+ ]
+)
+
+AC_SUBST([default_stack_size], [$with_default_stack_size])
+
#
# use modular IOCORE
#
diff --git a/iocore/eventsystem/I_Thread.h b/iocore/eventsystem/I_Thread.h
index cdbcceb..9e61cd3 100644
--- a/iocore/eventsystem/I_Thread.h
+++ b/iocore/eventsystem/I_Thread.h
@@ -72,7 +72,6 @@ class ProxyMutex;
typedef void *(*ThreadFunction)(void *arg);
static const int MAX_THREAD_NAME_LENGTH = 16;
-static const int DEFAULT_STACKSIZE = 1048576; // 1MB
/**
Base class for the threads in the Event System. Thread is the base
diff --git a/lib/ts/ink_config.h.in b/lib/ts/ink_config.h.in
index 475ac90..ec58faa 100644
--- a/lib/ts/ink_config.h.in
+++ b/lib/ts/ink_config.h.in
@@ -125,4 +125,6 @@
#define TS_BUILD_DEFAULT_LOOPBACK_IFACE "@default_loopback_iface@"
/* clang-format on */
+static const int DEFAULT_STACKSIZE = @default_stack_size@;
+
#endif /* _ink_config_h */
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].