64 位系统只能看到 4GB RAM 中的 3GB

64 位系统只能看到 4GB RAM 中的 3GB

我不是第一个问这个问题的人,但由于我没有找到有价值的答案,所以我再次问一遍:

我有一个 64 位 ubuntu 18.04,配备 4GB RAM,运行在 Intel Nuc nuc7pjyh2 上,但只有 3 GB 可用。

$ uname -a
Linux nuc 4.16.0-041600-generic #201804012230 SMP Sun Apr 1 22:31:39 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

来自kernel.log

Memory: 3085484K/3306296K available
(12300K kernel code, 2478K rwdata, 4244K rodata, 2404K init, 2416K bss,
 220812K reserved, 0K cma-reserved)

Jul 30 17:08:56 nuc kernel: [    0.000000] e820: BIOS-provided physical RAM map:
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000003dfff] usable
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x000000000003e000-0x000000000003ffff] reserved
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x0000000000040000-0x000000000009dfff] usable
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x000000000009e000-0x00000000000fffff] reserved
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000000fffffff] usable
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x0000000010000000-0x0000000012150fff] reserved
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x0000000012151000-0x000000004b494fff] usable
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x000000004b495000-0x000000004dd57fff] reserved
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x000000004dd58000-0x000000004dd7bfff] ACPI data
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x000000004dd7c000-0x000000004dddbfff] ACPI NVS
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x000000004dddc000-0x000000004e0a3fff] reserved
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x000000004e0a4000-0x000000004e164fff] type 20
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x000000004e165000-0x000000004e562fff] usable
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x000000004e563000-0x000000004e60efff] reserved
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x000000004e60f000-0x000000004ebfffff] usable
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x000000004ec00000-0x000000007fffffff] reserved
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x00000000d0000000-0x00000000d0ffffff] reserved
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x00000000d3709000-0x00000000d3709fff] reserved
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x00000000e0000000-0x00000000efffffff] reserved
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x00000000fe042000-0x00000000fe044fff] reserved
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x00000000fe900000-0x00000000fe902fff] reserved
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x00000000fed01000-0x00000000fed01fff] reserved
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved
Jul 30 17:08:56 nuc kernel: [    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000017fffffff] usable
Jul 30 17:08:56 nuc kernel: [    0.000000] NX (Execute Disable) protection: active
Jul 30 17:08:56 nuc kernel: [    0.000000] efi: EFI v2.60 by American Megatrends

但系统看到的是4GB:

$ sudo dmidecode -t memory
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 3.1.1 present.

Handle 0x0023, DMI type 16, 23 bytes
Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: None
    Maximum Capacity: 8 GB
    Error Information Handle: Not Provided
    Number Of Devices: 2

Handle 0x0025, DMI type 17, 40 bytes
Memory Device
    Array Handle: 0x0023
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 4096 MB          <=================
    Form Factor: SODIMM
    Set: None
    Locator: SODIMM1
    Bank Locator: Channel A Slot 0
    Type: DDR4
    Type Detail: Synchronous
    Speed: 2400 MT/s
    Manufacturer: Undefined
    Serial Number: 25201518
    Asset Tag: 9876543210
    Part Number: CT4G4SFS824A.C8FHP
    Rank: Unknown
    Configured Clock Speed: 2400 MT/s
    Minimum Voltage: 1.5 V
    Maximum Voltage: 1.5 V
    Configured Voltage: 1.5 V

那么剩下的1GB在哪儿?

答案1

剩余内存由 CPU 保留,供 GPU 和英特尔管理引擎使用,它们都内置于 CPU 中。

相关内容