Message-ID: <BANLkTim=QW62QLuduMsXuPp+5N-rTMjdjg@mail.gmail.com>
Date: 2011-05-14T23:50:48Z
From: Thomas Lumley
Subject: RProfmem output format
In-Reply-To: <BANLkTinazNHgW44pYFycun576E6C9U1L=Q@mail.gmail.com>
On Sat, May 14, 2011 at 5:00 AM, Hadley Wickham <hadley at rice.edu> wrote:
> Hi all,
>
> When I run the example in RProfmem, I get:
>
>
> ? ? Rprofmem("Rprofmem.out", threshold=1000)
> ? ? example(glm)
> ? ? Rprofmem(NULL)
> ? ? noquote(readLines("Rprofmem.out", n=5))
>
> ...
>
> [1] 1384 :5416 :5416 :1064 :1064 :"readRDS" "index.search" "example"
> [2] 1064 :"readRDS" "index.search" "example"
> [3] 4712 :"readRDS" "index.search" "example"
> [4] 4712 :"readRDS" "index.search" "example"
> [5] 1064 :"readRDS" "index.search" "example"
>
> What do 5 the numbers in the first line mean?
>
> In the subsequence lines I'm assuming the structure is bytes allocated : call.
I think the five numbers come from four memory allocations before
example() is called. Looking at the code in src/main/memory.c, it
prints newline only when the call stack is not empty.
I don't see why this is done, and I may well be the person who did it
(I don't have svn on this computer to check), but it is clearly
deliberate.
-thomas
--
Thomas Lumley
Professor of Biostatistics
University of Auckland