bin: larger stack size for debugging

This commit is contained in:
eric committed 2021-03-08 09:09:53 +08:00
1 parent fdce9425e3
commit fe2f23c4a5
1 file changed
+11 -1
+11 -1
View File
@@ -17,6 +17,16 @@ fn get_version_string() -> String {
}
}
#[cfg(debug_assertions)]
fn default_thread_stack_size() -> usize {
2097152
}
#[cfg(not(debug_assertions))]
fn default_thread_stack_size() -> usize {
24576
}
fn main() {
let matches = App::new("leaf")
.version(get_version_string().as_str())
@@ -44,7 +54,7 @@ fn main() {
.value_name("BYTES")
.about("Sets the stack size of runtime threads.")
.takes_value(true)
.default_value("24576"),
.default_value(&default_thread_stack_size().to_string()),
)
.arg(
Arg::new("test-outbound")