linux内核如何使用预留的物理内存,如何从linux内核--ubuntu系统cmdline上预留DDR物理内存DMA--mem=750M...

luther@gliethttp:~$ vim /proc/iomem

00100000-5bf0ffff : System RAM

00100000-00575553 : Kernel code

00575554-0078d307 : Kernel data

0081a000-008a809f : Kernel bss

可以看到kernel code和data,bss使用的ram就是我们的系统内存,

luther@gliethttp:~$ dmesg也可以看到物理内存的情况

BIOS-provided physical RAM map:

[    0.000000]  BIOS-e820: 0000000000000000 - 000000000009dc00 (usable)

[    0.000000]  BIOS-e820: 000000000009dc00 - 00000000000a0000 (reserved)

[    0.000000]  BIOS-e820: 00000000000d2000 - 0000000000100000 (reserved)

[    0.000000]  BIOS-e820: 0000000000100000 - 000000005bf10000 (usable)

[    0.000000]  BIOS-e820: 000000005bf10000 - 000000005bf19000 (ACPI data)

[    0.000000]  BIOS-e820: 000000005bf19000 - 000000005bf80000 (ACPI NVS)

[    0.000000]  BIOS-e820: 000000005bf80000 - 0000000060000000 (reserved)

[    0.000000]  BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)

[    0.000000]  BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)

[    0.000000]  BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)

[    0.000000]  BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)

luther@gliethttp:~$ vim /proc/meminfo

MemTotal:        1478540 kB

MemFree:          868544 kB

Buffers:           31084 kB

Cached:           321672 kB

SwapCached:            0 kB

luther@gliethttp:~$ sudo vim /boot/grub/grub.cfg

原来的

linux    /boot/vmlinuz-2.6.31-14-generic root=UUID=9a04b75d-22f4-4100-a8b0-a07ef00ead04 ro   quiet splash

新改的

linux    /boot/vmlinuz-2.6.31-14-generic root=UUID=9a04b75d-22f4-4100-a8b0-a07ef00ead04 ro   quiet splash mem=1442M

修改之后dmesg将多出如下一行提示:

[    0.000000] user-defined physical RAM map:

[    0.000000]  user: 0000000000000000 - 000000000009dc00 (usable)

[    0.000000]  user: 000000000009dc00 - 00000000000a0000 (reserved)

[    0.000000]  user: 00000000000d2000 - 0000000000100000 (reserved)

[    0.000000]  user: 0000000000100000 - 000000005a200000 (usable)

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值