Skip to content

Question on the R's C stack limit

4 messages · Ev Whin, Simon Urbanek, Brian Ripley

#
On Fri, 1 Jun 2007, Ev Whin wrote:

            
You have picked that out of the Windows-specific documentation without 
saying you are on Windows (are you?).  The setting is in 
src/gnuwin/front-ends, unsurprisingly.  (In the Makefile, to be exact.)
Please don't send HTML: see the posting guide.
#
On Jun 1, 2007, at 5:44 AM, Ev Whin wrote:

            
If you are embedding R, you can change or disable the stack limit by  
setting R_CStackLimit appropriately. There is no need to change the R  
source code.

Cheers,
Simon
#
On Fri, 1 Jun 2007, Simon Urbanek wrote:

            
Ah, you can change or disable R's detection of imminent stack limit 
transgressions.  That does not change the actual stack size.

You may well have guessed right that this question was actually about 
stack limit detection, but that is not what was written.

The point of the comment in the manual is that if you run R embedded in 
another application, R potentially needs a fairly large stack size.  The 1 
or 2Mb default of most Windows' compilers is insufficient, and stack size 
is a parameter in the header of the application, not of the compiled 
R.dll.