From 6f57abbda59937321096ca5bdb920d771e6dd658 Mon Sep 17 00:00:00 2001 From: Volodymyr Shymanskyy Date: Mon, 27 Apr 2020 10:34:48 +0300 Subject: [PATCH] Allow configuring M3_APP_MAX_STACK --- platforms/app/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platforms/app/main.c b/platforms/app/main.c index 328bb8c..15f0f30 100644 --- a/platforms/app/main.c +++ b/platforms/app/main.c @@ -18,6 +18,10 @@ #define FATAL(msg, ...) { printf("Error: [Fatal] " msg "\n", ##__VA_ARGS__); goto _onfatal; } +#ifndef M3_APP_MAX_STACK +#define M3_APP_MAX_STACK (64*1024) +#endif + M3Result repl_load (IM3Runtime runtime, const char* fn) { M3Result result = m3Err_none; @@ -154,7 +158,7 @@ void repl_free(IM3Runtime* runtime) M3Result repl_init(IM3Environment env, IM3Runtime* runtime) { repl_free(runtime); - *runtime = m3_NewRuntime (env, 64*1024, NULL); + *runtime = m3_NewRuntime (env, M3_APP_MAX_STACK, NULL); if (*runtime == NULL) { return "m3_NewRuntime failed"; }