avatar
如何扩大内存limit?# Unix - 噫吁兮,危乎高哉
q*e
1
情形如下:物理内存128M, OS is FreeBSD 4.4, 本人的Simulation程序run长时需大
量malloc memory,run后发现top显示SIZE为514M, RES是176M, 接着就dump core了。
程序本身应无问题,因为run短些时没问题。
Top显示:
Mem: 180M Active, 21M Inact, 32M Wired, 13M Cache, 35M Buf, 656K Free
Abort trap - core dumped
. PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
66351 dxu -22 0 514M 127M swread 0:11 36.96% 27.39% simulation
limit显示:
cputime unlimited
filesize unlimited
datasize 524288 kbytes
stacksize 65536
avatar
s*e
2
you might have to recompile kernel or pass in some parameter when kernel
boots up.

【在 q****e 的大作中提到】
: 情形如下:物理内存128M, OS is FreeBSD 4.4, 本人的Simulation程序run长时需大
: 量malloc memory,run后发现top显示SIZE为514M, RES是176M, 接着就dump core了。
: 程序本身应无问题,因为run短些时没问题。
: Top显示:
: Mem: 180M Active, 21M Inact, 32M Wired, 13M Cache, 35M Buf, 656K Free
: Abort trap - core dumped
: . PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
: 66351 dxu -22 0 514M 127M swread 0:11 36.96% 27.39% simulation
: limit显示:
: cputime unlimited

avatar
q*e
3
Do you know what those parameters maybe, or where I should check to find them
?
Thanks!



【在 s***e 的大作中提到】
: you might have to recompile kernel or pass in some parameter when kernel
: boots up.

avatar
q*e
4
请教了一些朋友,发现这样就行了:
(注意!!要recompile kernel, 要make sure原kernel备份到如/kernel.original,
若怕出问题可将你的所有东西备份,虽然理论上说即使新kernel不行,用原kernel也
能boot)
对FreeBSD:
1. cp /usr/src/sys/i386/conf/GENERIC MYNEWKERNEL
(若是alpha则是在/usr/src/sys/
alpha/conf/下)
2. 往MYNEWKERNEL中加:
options MAXDSIZ="(2048*1024*1024-1)"
options MAXSSIZ="(2048*1024*1024-1)"
options DFLDSIZ="(2048*1024*1024-1)"
注:Intelx86是32bit的, 只能支持到2G-1. alpha不知是否可更高。
3.按标准的kernel recompile and install的一套过程对MYNEWKERNEL做(即config
MYNEWKERNEL, make depend等等),然后重新boo

【在 s***e 的大作中提到】
: you might have to recompile kernel or pass in some parameter when kernel
: boots up.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。