Zend certified PHP/Magento developer

Why is the VirtualBox configured memory different from available memory within the VM?

I can’t figure out a reliable conversion between what is set in the VirtualBox machine settings and the exact value which will appear as MemTotal in /proc/meminfo.

Some tested values

Configured(M)  /proc/meminfo (K)
1024           1008560
2048           2040752
4096           4039168
6000           5958144
7000           6965768
8096           8069636

Trying to linear fit that gets me 997*x-17133.

The offset is easily explained with the default vram, but the ~1% error on that fit is what confuses me.

Any info on where the non-linearity comes from?