R Windows 64bit版本中不支持长矢量但错误
发布时间:2020-12-14 02:09:59 所属栏目:Windows 来源:网络整理
导读:我正在尝试测试当前R版本中的内存限制. runtest - function(size) { x - "testme" while(01) { x - c(x,x) size - object.size(x) # size of x when fail }} 通过在我的笔记本电脑上的控制台中运行runtest(大小),我收到以下错误: runtest(size)Error: canno
我正在尝试测试当前R版本中的内存限制.
runtest <- function(size) { x <- "testme" while(0<1) { x <- c(x,x) size <<- object.size(x) # size of x when fail } } 通过在我的笔记本电脑上的控制台中运行runtest(大小),我收到以下错误: > runtest(size) Error: cannot allocate vector of size 4.0 Gb In addition: Warning messages: 1: In structure(.Call(C_objectSize,x),class = "object_size") : Reached total allocation of 7915Mb: see help(memory.size) 2: In structure(.Call(C_objectSize,class = "object_size") : Reached total allocation of 7915Mb: see help(memory.size) 3: In structure(.Call(C_objectSize,class = "object_size") : Reached total allocation of 7915Mb: see help(memory.size) 4: In structure(.Call(C_objectSize,class = "object_size") : Reached total allocation of 7915Mb: see help(memory.size) > size 2147483736 bytes > 这个大小看起来非常接近人们之前提到的2 ^ 31-1限制.然后我尝试在我们升级的桌面上运行相同的代码,使用128GB的RAM,并将64位版本的快捷方式中的变量设置为100GB的最大内存使用量.这是我得到的新错误: Error in structure(.Call(C_objectSize,),class = "object_size"): long vectors not supported yet: unique.c: 1720 > size 8589934680 bytes > 此8.5GB限制是否与在Windows O / S(特别是Windows 7企业版)中运行有关?我认为R帮助文件(http://stat.ethz.ch/R-manual/R-devel/library/base/html/Memory-limits.html)解释了这一点,但我无法理解它的含义(不是我的专业领域). 解决方法
看一下
size.c和
unique.c的来源,看起来用于改进object.size的哈希不支持长向量:
/* Use hashing to improve object.size. Here we want equal CHARSXPs,not equal contents. */ 和 /* Currently the hash table is implemented as a (signed) integer array. So there are two 31-bit restrictions,the length of the array and the values. The values are initially NIL (-1). O-based indices are inserted by isDuplicated,and invalidated by setting to NA_INTEGER. */ 因此,它是一个令人窒息的object.size.如何调用数字(2 ^ 36)来查看是否可以创建这么大的对象(应该是64GB). (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- Windows上的64位版Octave
- 加速度计 – 如何识别Microsoft Band手势
- Windows Server 2016-命令行方式管理Windows服务
- windows-phone-7 – Windows Phone 7.0类库的计划任务
- 什么是适用于Windows的良好服务器性能监控软件?
- win10移动热点问题
- windows-server-2008-r2 – Server 2008 R2 KMS服务器 – 激
- windows-7 – Windows批次:如何添加主机条目?
- windows-server-2008 – 我需要知道是否有人使用我们的文件
- group-policy – 如何在Windows 2012中更改默认区域/区域性
推荐文章
站长推荐
热点阅读