系统装好了可以重新配置swap分区吗
Tofloor
poster avatar
grain
deepin
2016-10-18 07:56
Author
本来以为4G内存妥妥的不用swap,结果今天跑python,内存溢出了,现在在代码里及时del掉用完的变量暂时解决了这个问题,但是程序跑的时候仅python这个进程还是占了1.5G,我可以保证程序没问题,就用pickle.load()加载了100多兆图像数据集而已……

所以问题来了!!!现在还有办法分个swap吗,我可以从windows分区里压缩点空间出来。。。
Reply Favorite View the author
All Replies
avatar
grain
deepin
2016-10-18 07:59
#1
如果谁觉得是我代码的问题……我可以把源码放出来,反正目前也就写了十来行读了个数据……
Reply View the author
avatar
kuake
deepin
2016-10-18 14:20
#2
swap交换空间在诸多主流GNU/Linux都是很重要的概念。安装时,如果你不指定swap,安装程序一般都有提示。

如果我是你,安装时没分配swap,我就果断重新安装。

假设直接调整磁盘分区(从windows分区里压缩点空间出来),可能会导致已安装的GNU/Linux无法启动,,想象一下:,,你是不是要不得不转而去解决启动问题,,这里面又可能套着其他的坑,,越走越偏离你的主题(python编程)。
Reply View the author
avatar
applejan
deepin
2016-10-18 15:30
#3
特地注册来回答,你可以创建swap文件然后启用,不需要另开设分区
Reply View the author
avatar
zccrs
deepin
2016-10-18 17:05
#4
装好后也可以更改,不需要重装系统
Reply View the author
avatar
s***3@21cn.com
deepin
2016-10-18 17:10
#5
look at here
https://bbs.deepin.org/post/44517#=1#pid264124

7 floor
Reply View the author
avatar
grain
deepin
2016-10-18 21:43
#6
本帖最后由 grain 于 2016-10-18 13:44 编辑
https://bbs.deepin.org/post/44636
look at here
https://bbs.deepin.org/post/44517#=1#pid264124

Thx a lot. It works!
It was too late last night so I was just too tired to use the search engine first...

And thank you all guys!
Reply View the author
avatar
s***3@21cn.com
deepin
2016-10-19 03:55
#7
https://bbs.deepin.org/post/44636
Thx a lot. It works!
It was too late last night so I was just too tired to use the search engine fi ...

No problem
Reply View the author
avatar
yjqcx89
deepin
2016-10-19 04:18
#8

都这么高端了?看着都是我大天朝的人啊
Reply View the author
avatar
s***3@21cn.com
deepin
2016-10-19 04:51
#9
https://bbs.deepin.org/post/44636
都这么高端了?看着都是我大天朝的人啊

之前因为我的输入法坏了,打不了中文,so....
Reply View the author
avatar
黑色
deepin
2016-10-19 05:04
#10
可以分,很自由,但是为什么不用swap文件
Reply View the author