Why does the "free" command and "dmidecode" show different values for RAM?

With a 32-bit kernel, you only have 4GB of available address space. Some of this address space has to be used by the (virtual or physical) hardware in the system, such as video cards, NICs, etc., for their own purposes. This usage is usually between 256MB-1GB depending on how much address space the particular hardware needs.

Since that address space is used by hardware, the corresponding RAM is generally inaccessible to a 32-bit system.

You have a couple of options:

  1. The preferred option is to run a 64-bit operating system. This dramatically expands the address space, so there is plenty of room for all the RAM and hardware. It also breaks the 2GB/3GB 32-bit limit on applications while maintaining the ability to run 32-bit programs. In general, any system with 2GB of more of RAM should run a 64-bit OS to avoid these issues.
  2. Another option is to run a 32-bit kernel with PAE enabled. This will unhide the RAM, but each process will still be limited to 2GB/3GB of address space, depending on the particulars of the kernel build. Since 64-bit OSes will run 32-bit applications perfectly well, this has no advantage and many disadvantages (such as a lack of an upgrade path).

The output of the free command does not count reserved kernel memory and a few other small bits. You will see this discrepancy even in a 64-bit kernel and even with <2GB RAM.


The critical line from your physical RAM map is this one:

 BIOS-e820: 0000000100000000 - 0000000140000000 (usable)

This line shows that 1 GB (0x40000000 bytes, hexadecimal) of your system's physical RAM is being mapped by the BIOS above the 4GB limit, making it inaccessible by a 32-bit system without PAE.