Skip to content

Commit

Permalink
Allow configuring M3_APP_MAX_STACK
Browse files Browse the repository at this point in the history
  • Loading branch information
vshymanskyy committed Apr 27, 2020
1 parent 4779b44 commit 6f57abb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion platforms/app/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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";
}
Expand Down

0 comments on commit 6f57abb

Please sign in to comment.