[Rd] cairo device and pch="+"

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Jul 28 12:02:43 CEST 2008


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



More information about the R-devel mailing list