Skip to content
Prev 22439 / 398502 Next

Memory leak in R v1.5.1?

Moin Martin,

danke fuer Deine schnelle Antwort.

[I will continue in English for the sake of forwardability]

It's very understandable to me that you're asking for readable example 
code. But then I was wondering, do you really want to look through ~1300 
lines of code (w/o comments) generated from a collection of Sweave 
files? I guess in that case I'd have to reduce my problem down to a 
level that can be easily overlooked but still causes the problem. 
Unfortunately I don't have the time for that during the next two weeks 
(really - please don't ask).

My idea was to ask for some hints from you first, then try to fix it my 
own, if that doesn't work quickly, find some ugly work around and pick 
up the problem in two weeks for a real solution.

For example I don't understand how it is possible for my code to 
generate this memory leak in particular, since this is not me playing 
the pointer wizard in C and since it's a problem with cons cells and not 
the heap. If I know what I could be doing wrong, I might be able to 
solve the problem myself.

Should the consumption of cons cell ever grow during the course of a 
session? [The consumption of these cells does not even go down if I 
terminate the script.] I force garbage collection with gc() does that 
also take care of the cons cell or heap only?

Thanks.

- Jan
Martin Maechler wrote:
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._