[问题]512的内存为什么显示为503M?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
ZidaneLiu
帖子: 190
注册时间: 2007-07-17 8:14
来自: 上海东华大学

[问题]512的内存为什么显示为503M?

#1

帖子 ZidaneLiu » 2008-02-07 0:15

我内存是512的,但是ubuntu系统监视器里确显示的是503.6M,这是怎么回事?
我显卡是独立的64M,。。。
少了的内存应该不会是共享显存用掉的吧

还有一个问题,我用free -m查看的内存空闲数,和系统监视器里显示的空闲数相差很大阿,free -m显示内存有488M已用,而系统监视器里显示的是只有不到50%的内存已用阿,搞不懂。。。。
附件
Screenshot.png
Screenshot-系统监视器.png
ubuntu菜鸟的blog

我很菜,可是我很温柔~~~
头像
syrano
帖子: 4313
注册时间: 2007-10-06 18:40

#2

帖子 syrano » 2008-02-07 8:48

free显示的第一行,cache算进了内存占用,
第二行,cache没算进内存占用,就和监视器里一样了。
头像
ZidaneLiu
帖子: 190
注册时间: 2007-07-17 8:14
来自: 上海东华大学

#3

帖子 ZidaneLiu » 2008-02-07 13:47

哦,那我第一个问题是怎么回事?
ubuntu菜鸟的blog

我很菜,可是我很温柔~~~
gtr999
帖子: 107
注册时间: 2007-01-19 4:09

#4

帖子 gtr999 » 2008-02-07 17:55

那8M好象是内核抢占的
flyinflash
帖子: 2376
注册时间: 2006-09-21 14:28

#5

帖子 flyinflash » 2008-02-07 18:16

可能是集成显卡占了。

代码: 全选


lee@lee-laptop:~$ free -m
             total       used       free     shared    buffers     cached
Mem:           [color=darkred]494[/color]        486          8          0         26        170
-/+ buffers/cache:        290        204
Swap:         1026        153        873
lee@lee-laptop:~$ lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
[color=darkred]00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)[/color]
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751M Gigabit Ethernet PCI Express (rev 21)
15:00.0 CardBus bridge: Texas Instruments PCI1510 PC card Cardbus Controller
lee@lee-laptop:~$ 
像我,本来是512 MB 内存的,现在只有4**
头像
ZidaneLiu
帖子: 190
注册时间: 2007-07-17 8:14
来自: 上海东华大学

#6

帖子 ZidaneLiu » 2008-02-07 21:09

但我是64M
的独立显卡阿。。。。
ubuntu菜鸟的blog

我很菜,可是我很温柔~~~
xiangsiaiwen
帖子: 133
注册时间: 2007-12-26 8:02

#7

帖子 xiangsiaiwen » 2008-02-08 11:00

1M=1024K
头像
JangMunho
帖子: 1347
注册时间: 2006-01-18 12:55
来自: 也许真的没有人理解

#8

帖子 JangMunho » 2008-02-08 11:16

xiangsiaiwen 写了:1M=1024K
行不行啊,中毒了吧,那个说法只在硬盘和闪盘上存在……
MacBook Pro 15" User
Cocoa Programmer
头像
syrano
帖子: 4313
注册时间: 2007-10-06 18:40

#9

帖子 syrano » 2008-02-08 11:35

内核占了
内核内存布局


几个重要的标记的顺序
-------------------------------------PAGE_OFFET
|
|eg,512M物理内存
|
-------------------------------------highmemory
|
|8M的空洞
|
-------------------------------------VMALLOC_START
|
|用于由vmalloc和ioremap,也叫做非连续内存区
|
-------------------------------------KMAP_BASE和VMALLOC_END(4G-8M)
|
|永久内核映射(4M),有个专用的页表,位于4G-8M---4G-4M之间,用kmap来进行映射
|
-------------------------------------FIXADDR_START(4G-4M)
|
|临时映射(也叫固定映射)
|
-------------------------------------FIXADDR_TOP
|
END

weblog.php?w=53&previous=15
头像
super_soul
帖子: 191
注册时间: 2007-09-07 20:07
来自: 江苏 苏州

#10

帖子 super_soul » 2008-02-08 16:44

- -! 这年头内存不值钱。。别这么斤斤计较了。。。。
回复