0

Why linux /proc/meminfo show:" 1 MemTotal: 7038920 kB " (proc most likely is to mean Kibibyte) in a PC of 8 GB memory RAM, although its Kibibyte is 7812500 ?

2
  • 1
    It shows the total amount of available RAM after the BIOS and, eventually, video reservations. What's the question here? Commented Jun 8, 2023 at 19:00
  • 1
    Note: Since physical RAM is typically specified in gibibytes, 8GB RAM is 8388608 Kibibytes Commented Jun 8, 2023 at 23:32

1 Answer 1

1
  • BIOS may reserve some RAM which the OS cannot use.
  • The iGPU does reserve a decent chunk of RAM.
  • PCI Express devices may ask the BIOS to reserve some RAM for them (I'm not totally sure about that but I've heard something like that).

sudo dmesg | grep -i reserv will show you a lot.

Here I have more than 1GB of RAM reserved for various things: Memory: 65703592K/67015300K available (10240K kernel code, 1319K rwdata, 2148K rodata, 1268K init, 1400K bss, 1311448K reserved, 0K cma-reserved)

So while I have 64*1024*1024 which is 67,108,864 kB of RAM, I only have 65,782,988 kB of RAM available.

Memory (RAM/VRAM) is counted in powers of two in Linux like in most other OSes. So 1kB = 1024 bytes, 1mB = 1024 kB and so on.

You must log in to answer this question.