From ripley at stats.ox.ac.uk  Mon Jul 28 12:02:43 2008
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Mon, 28 Jul 2008 11:02:43 +0100 (BST)
Subject: [Rd] cairo device and pch="+"
In-Reply-To: <27d1e6020807280050p2d9daf38tc9f1b5a5ab1314f0@mail.gmail.com>
References: <27d1e6020807280050p2d9daf38tc9f1b5a5ab1314f0@mail.gmail.com>
Message-ID: <alpine.LFD.1.10.0807281100200.14149@auk.stats.ox.ac.uk>

We do document (in 'Writing R Extensions') how to find such leaks using 
valgrind, so in would have been very much more helpful to have done so. 
(Note that we know cairo 1.6.4 leaks small amounts of memory, more in 
older versions.)

The problem was in ucstoutf8 and is now fixed.

On Mon, 28 Jul 2008, Laurent Gautier wrote:

> Dear list,
>
> I have spotted what could be a memory leak somewhere.
>
> The example below shows how to quickly use up RAM on a linux machine
> (the example is taylored for a 2Gb machine, change the size of the matrix m
> is needed).
>
> # ---
> m <- matrix(rnorm(130), nrow=6000, 6)
> X11(type="cairo")
> pairs(m)
>
> # --- here the trouble starts (monitor the memory usage as the plot goes).
> pairs(m, pch="+")
>
> # this does not seem to act on memory usage of the R process
> dev.off()
> gc()
>
> # the only way to get back some memory is to kill the R process.
>
>
>
>
> L.
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] cairo device and pch="+"
Prof Brian Ripley