[quickjs-devel] Re: Native stack overflow

  • From: ShaJunxing <shajunxing@xxxxxxx>
  • To: quickjs-devel@xxxxxxxxxxxxx, "Alejandro Montoya (Redacted sender alejandro93 for DMARC)" <dmarc-noreply@xxxxxxxxxxxxx>
  • Date: Thu, 25 Mar 2021 08:54:02 +0800

在 2021/3/24 上午7:47, Alejandro Montoya (Redacted sender alejandro93 for DMARC) 写道:

Hi,

I noticed that the size of the stack on the native (C) size is unexpectedly large; in 
fact, for any JavaScript code slightly more complicated than "Hello world" the 
stack overflows the standard 1Mb size of WIN32 processes.

I can override it with a "/STACK:5000000" flag to the linker and that seems to 
solve the crashes but it also causes the process to reserve a lot of memory, effectively 
negating other benefits of the engine.

Has anyone looked into this and options available for reducing the native stack 
usage?

Thank you!

Maybe it's because quickjs uses "reference counting" gc strategy? So reference cycle must be dealed with by yourself. I love this and hate "mark & sweep" used by java and other languages because it is too complicated and it's happening is totally unexpected and will "stop the world". I love simple, tiny and general purposed technologies😁



Other related posts: