-/* Copyright (C) 2007-2013 Open Information Security Foundation
+/* Copyright (C) 2007-2022 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
int debuglog_enabled = 0;
int threading_set_cpu_affinity = FALSE;
+uint64_t threading_set_stack_size = 0;
/* Runmode Global Thread Names */
const char *thread_name_autofp = "RX";
}
SCLogDebug("threading.detect-thread-ratio %f", threading_detect_ratio);
+
+ /*
+ * Check if there's a configuration setting for the per-thread stack size
+ * in case the default per-thread stack size is to be adjusted
+ */
+ const char *ss = NULL;
+ if ((ConfGetValue("threading.stack-size", &ss)) == 1) {
+ if (ss != NULL) {
+ if (ParseSizeStringU64(ss, &threading_set_stack_size) < 0) {
+ FatalError(SC_ERR_INVALID_ARGUMENT,
+ "Failed to initialize thread_stack_size output, invalid limit: %s", ss);
+ }
+ }
+ }
+
+ SCLogDebug("threading.stack-size %" PRIu64, threading_set_stack_size);
}
-/* Copyright (C) 2007-2013 Open Information Security Foundation
+/* Copyright (C) 2007-2022 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
extern int threading_set_cpu_affinity;
extern float threading_detect_ratio;
+extern uint64_t threading_set_stack_size;
extern int debuglog_enabled;