An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-devel/attachments/20070601/67707672/attachment.pl
Question on the R's C stack limit
4 messages · Ev Whin, Simon Urbanek, Brian Ripley
On Fri, 1 Jun 2007, Ev Whin wrote:
Dear r-devel members, I encountered a C stack limit issue, when I tried to embed R 2.5 into my application. In the R-exts document, it says:"Note that R's own front ends use a stack size of 10Mb". I desire to know: is it possible to decrease this stack size by modifying R's source code? If it's possible, which part of the source code is responsible for the issue?
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.)
Thank you all. Whin [[alternative HTML version deleted]]
Please don't send HTML: see the posting guide.
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
On Jun 1, 2007, at 5:44 AM, Ev Whin wrote:
Dear r-devel members,
I encountered a C stack limit issue, when I tried to embed R
2.5 into my
application.
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
In the R-exts document, it says:"Note that R's own front ends use a stack size of 10Mb". I desire to know: is it possible to decrease this stack size by modifying R's source code? If it's possible, which part of the source code is responsible for the issue? Thank you all.
On Fri, 1 Jun 2007, Simon Urbanek wrote:
On Jun 1, 2007, at 5:44 AM, Ev Whin wrote:
Dear r-devel members,
I encountered a C stack limit issue, when I tried to embed R
2.5 into my
application.
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.
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.
Cheers, Simon
In the R-exts document, it says:"Note that R's own front ends use a stack size of 10Mb". I desire to know: is it possible to decrease this stack size by modifying R's source code? If it's possible, which part of the source code is responsible for the issue? Thank you all.
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595