anchao commented on code in PR #1638:
URL: https://github.com/apache/nuttx-apps/pull/1638#discussion_r1138088700


##########
interpreters/Wasm.mk:
##########
@@ -21,9 +21,14 @@
 ifeq ($(WASM_BUILD),y)
   ifneq ($(CONFIG_INTERPRETERS_WAMR)$(CONFIG_INTERPRETERS_WAMR3),)
 
-WASM_INITIAL_MEMORY ?= 65536
-STACKSIZE           ?= $(CONFIG_DEFAULT_TASK_STACKSIZE)
-PRIORITY            ?= SCHED_PRIORITY_DEFAULT
+STACKSIZE  ?= $(CONFIG_DEFAULT_TASK_STACKSIZE)
+PRIORITY   ?= SCHED_PRIORITY_DEFAULT
+
+ifneq ($(INITMEMORY),)
+  ifeq ($(shell test $(INITMEMORY) -lt $(STACKSIZE); echo $$?),0)
+    INITMEMORY := $(shell expr $(STACKSIZE) + $(INITMEMORY))

Review Comment:
   Some stack size configurations may be written like this:
   
   ```
   config EXAMPLES_HELLO_STACKSIZE
      int "Hello stack size"
      default 16384 if ARCH_SIM
      default DEFAULT_TASK_STACKSIZE
   ```
   
   It is common to have different stack size on different platforms



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to