From gte810u@prism.gatech.edu  Thu Sep 12 13:10:39 2002
From: gte810u@prism.gatech.edu (David Bauer)
Date: Thu, 12 Sep 2002 08:10:39 -0400
Subject: Startup/Initialization Memory Leak in R
In-Reply-To: <odq0ou06245rdvfks24kkcf6ctsagk4k1o@4ax.com>
References: <5.1.1.5.2.20020911210204.00ac4270@pop.prism.gatech.edu>
 <5.1.1.5.2.20020911210204.00ac4270@pop.prism.gatech.edu>
Message-ID: <5.1.1.5.2.20020912080541.025d1cc0@pop.prism.gatech.edu>


> >    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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


Startup/Initialization Memory Leak in R
David Bauer