If I run

free -h

I see a total 121M listed and I have 16MB shared for video. The Raspberry Pi I'm using has a K4P2G324ED-AC1 chip and I expected to see something around 240M instead of 121M because the board should have 256M.

Here is the output:

                total       used        free    shared  buffers cached
Mem:             121M       110M         10M        0B     640K    20M
-/+ buffers/cache:           89M         31M
Swap:             99M        11M         88M

Also had a look in /boot/config.txt and the only a gpu_mem=16 line. I've called free again after killing the UI but the total is still listed as 121M.

Is that just an error in how the data is displayed or can the board only use 128M ? If I can only use half the memory available, is there any way to fix this ?

I'm using the latest raspian wheezy and I ran apt-get update and upgrade.

Is anyone else experiencing this ? I can't seem to set the video memory to 16MB(raspi-config and config.txt lists as 16, but I still don't see the remaining memory as available)


1 Answer 1


By default, memory is dynamically allocated to the GPU or CPU depending on the system's needs. You may have 128/128 split rather than the 240/16 split that you think you have.

  • I've used raspi-config to allow the GPU 16M. Is that all that I need to do ? Commented Sep 12, 2013 at 17:29
  • Have a look in /boot/config.txt and add to your post any lines starting with gpu_ or cmu_. I'm guessing Lawrence is referring to this: elinux.org/RPiconfig#CMA_-_Dynamic_Memory_Split altho I don't think that is the situation "by default". But if it is: based on your mem usage, I'm assuming you were running the GUI when you ran free, which might require more GPU memory. Try killing the Xorg server from a VT (e.g. "ctrl-alt-F3" and killall X -- if xdm respawns, you need to find another way) and check again.
    – goldilocks
    Commented Sep 12, 2013 at 19:08
  • @goldilocks I've updated the answer. I only see gpu_mem=16 and I get the same total amount of memory (121M) when I call free after killing the gui Commented Sep 12, 2013 at 20:04
  • I seem to recall Dom saying that cmu was enabled by default, but I could be wrong. After you kill X, the system memory won't be reclaimed unless the system needs it. Try running a memory intensive task after you kill X, then check the output of free
    – Lawrence
    Commented Sep 13, 2013 at 1:35
  • I've justed with two more raspberry pi boards (model b) and did the above tests. With the default settings(128MB shared for video) I see 374M listed as the total, 127M used and 217M free. On the another model b board I've setup the 16MB shared for video instead of 128MB but what it doesn't see to make a big difference: total is 374M, used 120M, free: 254M. Perhaps free isn't the correct command tist all te memory ? I was expecting a total of 256M for model a and 512M for model b. Does anyone else get this behaviour ? Maybe the rest of the ram is reserved, but I'd like to know for sure Commented Mar 11, 2014 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.