From ripley@stats.ox.ac.uk  Mon Oct 14 16:11:07 2002
From: ripley@stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Mon, 14 Oct 2002 16:11:07 +0100 (BST)
Subject: growing process size in simulation
In-Reply-To: <Pine.A41.4.44.0210140659330.71008-100000@homer07.u.washington.edu>
Message-ID: <Pine.LNX.4.31.0210141610500.1801-100000@gannet.stats>

Reference to valgrind, please?

On Mon, 14 Oct 2002, Thomas Lumley wrote:

> On Sat, 12 Oct 2002, Luke Tierney wrote:
>
> >
> > I wonder if there is something we could add to the QA tools that could
> > have picked this up.
> >
>
> valgrind will do this (under Linux only).  I just tried it and got
>
> ==6195== 151040 bytes in 295 blocks are definitely lost in loss record 49
> of 50
> ==6195==    at 0x400434EB: malloc (vg_clientfuncs.c:100)
> ==6195==    by 0x8091BB0: R_AllocStringBuffer (deparse.c:150)
> ==6195==    by 0x8093501: print2buff (deparse.c:940)
> ==6195==    by 0x8092760: deparse2buff (deparse.c:560)
>
> but
> ==6195== 12341268 bytes in 6183 blocks are still reachable in loss record
> 50 of 50
> ==6195==    at 0x400434EB: malloc (vg_clientfuncs.c:100)
> ==6195==    by 0x80D0131: GetNewPage (memory.c:552)
> ==6195==    by 0x80D3188: Rf_allocVector (memory.c:1731)
> ==6195==    by 0x80D2ECB: Rf_allocString (memory.c:1622)
> ==6195==
>
> showing that it can distinguish memory leaks from memory that just hasn't
> been freed.
>
> 	-thomas
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
Brian D. Ripley,                  ripley@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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

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


growing process size in simulation
ripley@stats.ox.ac.uk