Startup/Initialization Memory Leak in R

David Bauer gte810u@prism.gatech.edu
Thu, 12 Sep 2002 08:10:39 -0400


> >    Is it already known that R does not free the memory that it allocates
> >during start-up (~10MB) when it exits?  If so, are there currently any
> >plans to address this problem?  I noticed that the 1.6.0 beta leaks
> >slightly more memory (~300k) than the 1.5.1 stable version.
>
>I don't think this is known.
>
>What platform are you on, and how are you measuring the leak?  On
>Windows, it is not the responsibility of an application to release its
>memory, that's the responsibility of the OS, so if the problem is
>happening there, you should be talking to Microsoft (or questioning
>how you measured it).

Working on a Linux box, I originally found the leak using a memory 
management program that I wrote.  I confirmed the leak using the Valgrind 
program (http://developer.kde.org/~sewardj/), which produces a nice 
output.  If you would like, I can post a full or edited output from that 
program.  The majority of the memory is allocated using the GetNewPage 
function in memory.c and appears to still be in the table of allocated 
pages when R exits.


David Bauer

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._