[R] memory problem

Huntsinger, Reid reid_huntsinger at merck.com
Wed Dec 8 16:27:28 CET 2004

Some additional details would help. What platform? What does the C++ code do
that might cause a memory leak? How are you calling it? 

I don't see why unloading the library would free memory even if it were
allocated outside R's memory management. Unless you're using Windows you
don't need to worry about allocating memory for R, just check that there are
no limits on memory allocation set by the administrator. 

Reid Huntsinger 

-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Samuel Kemp
Sent: Wednesday, December 08, 2004 6:29 AM
To: r-help at stat.math.ethz.ch
Subject: [R] memory problem


I am trying to run a very computationally expensive procedure in 
R-2.0.0. and the process always gets killed after approx 8 minutes. This 
procedure calls some of my own C++ code - in case it was this code 
causing a memory leak I unload and then reload the .so file every time, 
however I still get the same problem. The procedure is run 16000 times 
and always calls the lm() function. My believe at the moment is that I 
need to allocate more memory for R - is this correct? I did try envoking 
R from the command line using R --min-vsize=1000M, however still no luck.

I have googled around and looked at the help files, but I am still 
confused about how to fix this problem.

Any insight would be greatly appeciated.

Kind Regards,


R-help at stat.math.ethz.ch mailing list
PLEASE do read the posting guide!

More information about the R-help mailing list