C stack size too small
See original GitHub issueHey,
first off thanks for radian, it looks nice and mostly works great!
I have some code with recursion and nested functions which I can’t run in radian:
Error: C stack usage 1915264 is too close to the limit
but can run without issue in R.exe
(64bit).
Radians C stack seems to be much smaller than the normal R terminal’s.
radian.exe:
size current direction eval_depth
1914470 16008 1 2
vs. R.exe
size current direction eval_depth
63737856 11288 1 2
As far as I could find out this is a compiler setting that needs to be adjusted? Or is there a way to change this via cli flag or something?
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (4 by maintainers)
Top Results From Across the Web
C/C++ maximum stack size of program on mainstream OSes
In Visual Studio the default stack size is 1 MB i think, so with a recursion depth of 10,000 each stack frame can...
Read more >How much stack usage is too much?
It depends on your operating system. On Windows, the typical maximum size for a stack is 1MB, whereas it is 8MB on a...
Read more >STACKSIZE (Sun Studio 12 Update 1: C User's Guide)
If the stack size is too small for a thread to run, the program will abort with a segmentation fault.
Read more >Stack size invisibility in C and the effects on "portability"
The alternative was to fault when you overflowed the smaller stack when that data was imported. It does mean if there's an infinite...
Read more >What is Stack Size?
The default Ingres stack size is 65536 bytes or 64 KB. In general the default Ingres stack_size of 65536 is too small. For...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can confirm that this only happens with R 4.2 but not with R 4.1.3 with the same unchanged radian version (0.6.0).
As the stack usage can be alleviated by changing the python executable it seems to be some interplay between python and R 4.2? Maybe the issue is with rchitect? @randy3k
@colinpmillar