zoukankan      html  css  js  c++  java
  • 阿里云上遇到: virtual memory exhausted: Cannot allocate memory

    阿里云上遇到: virtual memory exhausted: Cannot allocate memory, 怎么破?

  •   
   y0 · 2013-07-11 22:16:24 +08:00 · 7410 次点击
这是一个创建于 1508 天前的主题,其中的信息可能已经有所发展或是发生改变。
买了个服务器, 1G 的内存,编译东西按说应该够了,安装相关的内容也没问题,但是编译了一阵就遇到

virtual memory exhausted: Cannot allocate memory 这个问题。

搜了一下,好像挺普遍的。有谁有经验吗,怎么解决?

P.S. 按照别人说的设置了 ulimit -v 10000000 啥的,还是遇到这类问题。
3 回复  |  直到 2014-09-10 15:06:20 +08:00
    1
xdeng   2013-07-11 22:20:23 +08:00   ♥ 1
swap??? 没设?
    2
y0   2013-07-11 22:54:01 +08:00   ♥ 1
搞定了。 

# dd if=/dev/zero of=/swap bs=1024 count=1M 
Format the swap file: 
# mkswap /swap 
Enable the swap file: 
# swapon /swap 
Enable swap on boot: 
# echo "/swap swap swap sw 0 0" >> /etc/fstab
    3
herewei   2014-09-10 15:06:20 +08:00
Adding --disable-fileinfo to ./configure solves the problem.

查看全文
  • 相关阅读:
    pig安装
    [2013.10.29][Luogu OJ P1873]砍树
    [转帖]OIer之魂、
    [转帖]我们是OIer、
    10007:[2013.10.25]P1.滚土豆(potato.pas/c/cpp)
    [2013.10.18]P2.传作业 (pass.pas/c/cpp)
    [Luogu OJ P1619]解一元二次方程的烦恼
    [Luogu OJ P1433][2013.10.18]DFS基础题-吃奶酪
    高精度加减乘法小程序 Ver 0.9.5 beta
    [2013.10.11]P3.和为零
  • 原文地址:https://www.cnblogs.com/youyuanjuyou/p/8258608.html
  • Copyright © 2011-2022 走看看