Re: [Rd] RProfmem output format

2017-05-30 Thread Henrik Bengtsson
UPDATE: Tomas Kalibera has fixed this bug (on missing newlines in Rprofmem output) in R-devel r72747 (https://github.com/wch/r-source/commit/ba6665deace4a8dc239aebec977c17d0975fbc27). Using the example of this thread, Rprofmem() of R-devel now outputs with newlines: $ R Under development (unstab

Re: [Rd] RProfmem output format

2016-06-04 Thread Henrik Bengtsson
I'm picking up this 5-year old thread. 1. About the four memory allocations without a stacktrace I think the four memory allocations without a stacktrace reported by Rprofmem(): > Rprofmem(); x <- raw(2000); Rprofmem("") > cat(readLines("Rprofmem.out", n=5, warn=FALSE), sep="\n") 192 :360 :360 :

Re: [Rd] RProfmem output format

2011-05-15 Thread Thomas Lumley
On Mon, May 16, 2011 at 1:02 AM, Hadley Wickham wrote: > So what causes allocations when the call stack is empty?  Something > internal?  Does the garbage collector trigger allocations (i.e. could > it be caused by moving data to contiguous memory)? The garbage collector doesn't move anything, it

Re: [Rd] RProfmem output format

2011-05-15 Thread Hadley Wickham
Also, would you mind commenting how RProfmem is misleading? There are three ways to profile memory use over time in R code. ... All can be misleading, for different reasons. --- http://cran.r-project.org/doc/manuals/R-exts.html#Profiling-R-code-for-memory-use The other two ways describe why they

Re: [Rd] RProfmem output format

2011-05-15 Thread Hadley Wickham
>> 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. Looking into that

Re: [Rd] RProfmem output format

2011-05-14 Thread Thomas Lumley
On Sat, May 14, 2011 at 5:00 AM, Hadley Wickham 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 :"re