From 3508bf4e392e4eb8b2f4b437341c6ee66769d1da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Mon, 16 Dec 2024 09:45:12 +0100 Subject: [PATCH] core: adjust stack size down to 1 MB --- Makefile | 2 +- src/vm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fdb189d7..eb84e5a2 100644 --- a/Makefile +++ b/Makefile @@ -177,7 +177,7 @@ test: test-advanced: cd tests/advanced && npm install - ./$(BUILD_DIR)/tjs test tests/advanced/ + ./$(BUILD_DIR)/tjs --stack-size 10485760 test tests/advanced/ .PRECIOUS: src/bundles/js/core/%.js src/bundles/js/stdlib/%.js .PHONY: all js debug install clean distclean format test test-advanced core stdlib $(TJS) diff --git a/src/vm.c b/src/vm.c index 53ffe7b8..4e27c170 100644 --- a/src/vm.c +++ b/src/vm.c @@ -31,7 +31,7 @@ #include #include -#define TJS__DEFAULT_STACK_SIZE 10 * 1024 * 1024 // 10 MB +#define TJS__DEFAULT_STACK_SIZE 1024 * 1024 // 1 MB /* JS malloc functions */