Rprofmem(filename = "Rprofmem.out", append = FALSE, threshold = 0)NULL or "" to disable reporting. malloc is called to allocate a large vector object or to
allocate a page of memory for small objects. The size of a page of
memory and the size above which malloc is used for vectors are
compile-time constants, by default 2000 and 128 bytes respectively. The profiler tracks allocations, some of which will be to previously
used memory and will not increase the total memory use of R.Rprof also collects
memory information. tracemem traces duplications of specific objects. The "Writing R Extensions" manual section on "Tidying and profiling R code"