I know how to set the stack size thanks to: How can I increase the maximum call stack size in Node.js
But, what is the default size? (ie how do I get to the PHP equivalent of phpinfo()
)
Stacks are temporary memory address spaces used to hold arguments and automatic variables during invocation of a subprogram or function reference. In general, the default main stack size is 8 megabytes.
In Microsoft Windows 2000, if the Microsoft ASP.NET Worker Process (ASPNet_wp.exe) creates a thread, the maximum stack size of the thread is 1 MB. In Windows Server 2008 and higher, the maximum stack size of a thread running on 32-bit version of IIS is 256 KB, and on an x64 server is 512 KB.
Stacks are temporary memory address spaces used to hold arguments and automatic variables over subprogram invocations. The default size of the main stack is about eight megabytes.
Without any local variables, each function call takes up 48 bytes during the execution, and you are limited to less than 1MB for all local function frames. Each boolean and number variable takes 8 bytes of memory.
The simple answer is that the default stack size is 492 kBytes (32-bit) and 984 kBytes (64-bit).
As commented by soyuka try this:
$ node --v8-options | grep -B0 -A1 stack_size
or
$ node --v8-options | grep -B0 -A1 stack-size
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With