[R-SIG-Mac] Setting ulimit in R.app (GUI)
simon.urbanek at r-project.org
Sat Sep 2 00:40:20 CEST 2006
On Aug 26, 2006, at 10:15 AM, Klaus Thul wrote:
> Dear all,
> my R-program which does a lot of object allocation / de-allocation.
> To be able to run it without running into excessive swapping, I have
> to set an limit on the maximum memory used by R.
> Within terminal, this can be done easily:
> ulimit -m 1000000
> > source("myprogram.R")
> I can then observe nicely in ActivityMonitor that the amount of
> memory used by R growth upto 1GB (my machine has 1.5GB installed) and
> is then reduced drastically by the garbage collector.
> But I would prefer to work in the GUI (R.app). Is there a way to set
> such an limit for the R-process started within the GUI?
Other than using a shell-wrapper to start the GUI (that same way you
start R above), I don't think so. I guess it could be added as a
configurable option e.g. via defaults if desired. There is another
theoretical alternative - setting the default limit for LS which will
then be inherited by the GUI, but that would also limit other
applications started via LS.
More information about the R-SIG-Mac