免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1368 | 回复: 2
打印 上一主题 下一主题

关于options MAXMEM? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-01-17 18:47 |只看该作者 |倒序浏览
技术内幕上面说BSD检测的内存比实际的物理内存少,需要在内核中添加options MAXMEM选项,是不是只有老版本存在这个问题?

论坛徽章:
0
2 [报告]
发表于 2007-01-17 18:58 |只看该作者
====

一般标题有什么 “内幕” “解密” 的书,都不提内幕,也不解密什么。

====

论坛徽章:
2
亥猪
日期:2014-03-19 16:36:35午马
日期:2014-11-23 23:48:46
3 [报告]
发表于 2007-01-17 20:29 |只看该作者
# MAXMEM specifies the amount of RAM on the machine; if this is not
# specified, FreeBSD will first read the amount of memory from the CMOS
# RAM, so the amount of memory will initially be limited to 64MB or 16MB
# depending on the BIOS.  If the BIOS reports 64MB, a memory probe will
# then attempt to detect the installed amount of RAM.  If this probe
# fails to detect >64MB RAM you will have to use the MAXMEM option.
# The amount is in kilobytes, so for a machine with 128MB of RAM, it would
# be 131072 (128 * 1024).
[src/sys/i386/conf/NOTES]

简单的说,重点在两个if -- If the BIOS ;  If this probe fails
能检测出来就不手动修改,否则就自己修改。
我想《内幕》的意思应该是指:
>>>(if probe fails)BSD检测的内存比实际的物理内存少,那么才需要在内核中添加options MAXMEM选项

另:
......
* Total memory size may be set by the kernel environment variable
* hw.physmem or the compile-time define MAXMEM.
......
*/
static void
getmemsize(int first)
{
......
[src/sys/i386/i386/machdep.c]

[ 本帖最后由 gvim 于 2007-1-17 20:36 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP