树莓派编译程序时报错:virtual memory exhausted: Cannot allocate memory
2024-10-19 00:23:52
一、原因分析:
树莓派内存太小,编译程序会出现virtual memory exhausted: Cannot allocate memory的问题,可以用swap扩展内存的方法。
二、解决方法:
安装dphys-swapfile软件包,安装后默认设置的swap大小为物理内存的两倍,最大为2G。
Autogenerate and use a swap file
This init.d script exists so one does not need to have a fixed size swap partition. Instead install without swap partition and then run this, with file size (re-)computed automatically to fit the current RAM size.
By default (and hence on installation) it creates swapfile twice as big as the present RAM amount with an upper limit of 2 GB.
参考:https://packages.debian.org/jessie/admin/dphys-swapfile
最新文章
- swift 如何实现点击view后显示灰色背景
- SolrCloud的官方配置方式
- poj-------------(2752)Seek the Name, Seek the Fame(kmp)
- 分享我设计的iOS项目目录结构
- 比较compareTo与equals及==的区别
- 利用COPYDATASTRUCT传递命令行参数给驻留内存的进程(SendMessage应用)
- inpuy type=date
- Cocos2d-JS中的cc.LabelTTF
- Rebound-Android的弹簧动画库
- java集合框架复习(一)
- html5 高清屏幕图片处理
- 模板页 相对路径 JS 加载问题
- No1_2. 流程控制_java学习笔记
- oc内存管理总结(一)
- CRM setValue方法日期类型字段赋值
- 说出x的结果,并解释为什么?
- JQuery 插件之Ajax Autocomplete(ajax自动完成)
- supervisor笔记
- kubernetes 集群的安装部署
- PTA的使用简介