MacBook Pro running Linux - only 3.6 GB RAM available (This is a repost of my question on SuperUser.com, hopefully it's better suited here ).

I've happily installed Linux on my MacBook Pro with 4 GB of RAM, but I only get 3.6 GB available:

robert@raptor ~$ free -m
             total       used       free     shared    buffers     cached
Mem:          3684       2184       1500          0         83       1096
-/+ buffers/cache:       1004       2680
Swap:         6149          0       6149


I'm running a 64-bit kernel so this should not be a problem:

robert@raptor ~$ uname -a
Linux raptor 2.6.34.7-0.5-desktop #1 SMP PREEMPT 2010-10-25 08:40:12 +0200 x86_64 x86_64 x86_64 GNU/Linux


What can I do to get the whole 4 GB available?



Update: this is what I get when running top on MacOS X:

PhysMem: 540M wired, 640M active, 231M inactive, 1411M used, 2685M free.


where used + free = 4096 MB.

Update 2: There's a thread on MacRumors.com where a user complains of the same problem with Windows 7/64 bit.

Update 3: /proc/meminfo output:

MemTotal:        3773288 kB
MemFree:         1164244 kB
Buffers:          109096 kB
Cached:          1270520 kB
SwapCached:            0 kB
Active:          1446756 kB
Inactive:         962728 kB
Active(anon):     803404 kB
Inactive(anon):   230556 kB
Active(file):     643352 kB
Inactive(file):   732172 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       6297596 kB
SwapFree:        6297596 kB
Dirty:               792 kB
Writeback:             0 kB
AnonPages:       1029880 kB
Mapped:           185096 kB
Shmem:              4096 kB
Slab:             131260 kB
SReclaimable:     106212 kB
SUnreclaim:        25048 kB
KernelStack:        2680 kB
PageTables:        21248 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     8184240 kB
Committed_AS:    3113016 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      123884 kB
VmallocChunk:   34359596028 kB
HardwareCorrupted:     0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       54444 kB
DirectMap2M:     3852288 kB


Memory info from dmesg:

[    0.000000] Memory: 3759972k/5242880k available (4780k kernel code, 1336600k absent, 146308k reserved, 6603k data, 892k init)
Some of the memory is used by the hardware -- for example, most MacBook Pros have 256MB of main memory used by the graphics adaptor. OS X knows about this and can account for it, but Linux doesn't. Your Linux installation has access to all of the available memory.