Re: R-alpha: Memory exhausted

Gregory R. Warnes (warnes@biostat.washington.edu)
Fri, 15 Nov 1996 07:57:00 -0800 (PST)


Date: Fri, 15 Nov 1996 07:57:00 -0800 (PST)
From: "Gregory R. Warnes" <warnes@biostat.washington.edu>
To: r-testers@stat.math.ethz.ch,
Subject: Re: R-alpha: Memory exhausted
In-Reply-To: <9611151137.AA15255@gigamain.Statistik.Uni-Dortmund.DE>


Currently R does not do dynamic memory allocation.  Rather it allocates a
fixed amount of memory when it is started.  The current default is 2
megabytes of RAM, clearly to small to hold a data set with 210432
observations.  (210432 observations x at least 4 bytes/observation >= 8
megabytes). 

You can ask R to allocate more memory by using the "-v" 
parameter when starting it.  So, you can have it allocate 20 megabytes by 
doing:
  R -v20

Alternatively, you can change the default size in $RHOME/src/main/main.c on 
the lines:
        /* Heap and Pointer Protection Stack Sizes. */
        /* These compiled in values are minima and it should be */
        /* possible to override them in a platform dependent way. */


#define SSIZE   10000L          /* pointer protection stack size */
#define NSIZE   200000L         /* number of cons cells */
#define VSIZE   2000000L        /* vector heap size in bytes */


I hope this helps,

Greg Warnes

On Fri, 15 Nov 1996, Detlef Steuer wrote:

> I'm running R-013 on a SUN. Everything seems to work fine.
> My problem are 210432 data points from a time series (every 15min, 6 years).
> 
> When I try to load them in memory I get "memory exhausted".
> "top" says something like 100Mb swap and 10 Mb real memory still free. 
> My data sums up around 2Mb.
> 
> How can I increase the memory R uses? Or is it a bug?
> 
> Thank you,
> Detlef
> 
> Detlef Steuer 
> University of Dortmund, Department of Statistics
> e-mail: steuer@gigamain.statistik.uni-dortmund.de
> Tel: ++49 +231 755 3139 Fax: ++49 +231 755 4387
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> r-testers mailing list -- To (un)subscribe, send
> subscribe	or	unsubscribe
> (in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> 


-------------------------------------------------------------------------------
    Gregory R. Warnes          | It is high time that the ideal of success
warnes@biostat.washington.edu  |  be replaced by the ideal of service.
                               |                       Albert Einstein
-------------------------------------------------------------------------------

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-