Search code examples
memoryoperating-system

My physical address size and how much RAM I have differ a lot


I was recently introduced to the topic : Operating Systems. I read about how physical/virtual memory are represented in bits so I thought of checking the same on my ubuntu laptop. I ran lsmem/lscpu on the terminal to get some information about my system, for the first command it prints Total online memory:15.9G which is true BUT for the latter command it says I have Address sizes: 39 bits physical, 48 bits virtual. The thing is, 2^39 is about 64GB? Am I missing something out or does the address size represents something else? Any help is appreciated, thanks for your time :)


Solution

  • Am I missing something out or does the address size represents something else?

    The physical address space is used for RAM, ROM, memory map devices (e.g. maybe 100 GiB for an NVME storage device, maybe 512 MiB just a video card and maybe 128 KIB for a USB controller).

    The physical address space also contains lots of "literal nothing". This is space that might be used if you upgraded your RAM, plugged more devices in, etc. It also helps the CPU manufacturer use the same chip design for different computers (instead of having many slightly different chips all with different physical address sizes).