找回密码
 注册
查看: 1693|回复: 0

R语言:Rprofmem()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 19:58:36 | 显示全部楼层 |阅读模式
Rprofmem(utils)
Rprofmem()所属R语言包:utils

                                        Enable Profiling of R's Memory Use
                                         使R的内存使用的性能分析

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Enable or disable reporting of memory allocation in R.
启用或禁用R中的内存分配的报告


用法----------Usage----------


Rprofmem(filename = "Rprofmem.out", append = FALSE, threshold = 0)



参数----------Arguments----------

参数:filename
The file to be used for recording the memory allocations. Set to NULL or "" to disable reporting.  
该文件将用于记录内存分配。设置NULL或""禁用汇报。


参数:append
logical: should the file be over-written or appended to?  
逻辑:文件应过度书面或追加?


参数:threshold
numeric: allocations on R's "large vector" heap larger than this number of bytes will be reported.  
将报告数字:R的“大向量”堆大于这个数目的字节分配。


Details

详情----------Details----------

Enabling profiling automatically disables any existing profiling to another or the same file.
启用分析自动禁用任何现有的分析到另一个或相同的文件。

Profiling writes the call stack to the specified file every time 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.
分析调用堆栈写入到指定文件每次malloc被称为分配一个大的矢量对象或分配一个小对象的内存页。一个内存页的大小和规模以上malloc用于矢量编译时间常数,默认情况下,2000年和128字节。

The profiler tracks allocations, some of which will be to previously used memory and will not increase the total memory use of R.
其中一些探查轨道拨款,将以前使用的内存并不会增加总的内存使用的河


值----------Value----------

None  
没有


注意----------Note----------

The memory profiler slows down R even when not in use, and so is a compile-time option. The memory profiler can be used at the same time as other R and C profilers.
内存分析器减慢ŕ即使在不使用时,是一个编译时间选项。内存分析器可以用来在同一时间为其他的R和C分析器。


参见----------See Also----------

The R sampling profiler, Rprof also collects memory information.
采样分析器的R,Rprof还收集内存信息。

tracemem traces duplications of specific objects.
tracemem追踪特定对象的重复。

The "Writing R Extensions" manual section on "Tidying and profiling R code"
“书写R附加节”手册“整理和分析R代码”


举例----------Examples----------


## not supported unless R is compiled to support it.[#不支持,除非R是编译来支持它。]
Rprofmem("Rprofmem.out", threshold=1000)
example(glm)
Rprofmem(NULL)
noquote(readLines("Rprofmem.out", n=5))


转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-6 06:39 , Processed in 0.020614 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表