Error: cannot allocate vector of size XX Gb
Posted Data+Science+Insight
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Error: cannot allocate vector of size XX Gb相关的知识,希望对你有一定的参考价值。
Error: cannot allocate vector of size XX Gb
目录
Error: cannot allocate vector of size XX Gb
#问题
x <- rnorm(4000000000)
# Trying to run rnorm function
# Error: cannot allocate vector of size 29.8 Gb
#解决
#垃圾回收;
gc()
#空间依旧不够
x <- rnorm(4000000000)
# Trying to run rnorm function
# Error: cannot allocate vector of size 29.8 Gb
#增大内存
#查看分配的内存大小
memory.limit()
# Check currently set limit
# [1] 16267
#增大分配的内存
memory.limit(size = 35000)
# Increase limit
# [1] 35000
x <- rnorm(4000000000)
# Successfully running rnorm function
参考:R
参考:R Error: Cannot Allocate Vector of Size N GB (2 Examples) | How to Increase the Memory Limit
以上是关于Error: cannot allocate vector of size XX Gb的主要内容,如果未能解决你的问题,请参考以下文章
Hive failed; error=‘Cannot allocate memory‘ (errno=12)
JVM crashes with error=‘Cannot allocate memory‘ (errno=12)
Error: cannot allocate vector of size 88.1 Mb问题
服务器上Kafka启动报错:error=‘Cannot allocate memory‘ (errno=12)
解决Caused by: java.io.IOException: java.io.IOException: error=12, Cannot allocate memory
ORA-27102:out of memory Linux-x86_64 Error: 12: Cannot allocate memory