Currently It seems that the current 32 bit editions of Ubuntu can only take advantage of 3GB (sometimes a little more) of physical memory. Desktops and gaming rigs using 6 and 8 GB of RAM are ubiquitous now.I am having a ubuntu desktop with 5GB RAM and i want to use all the available memory for gaming.
Procedure to follow
You need to install the following packages and restart your PC
sudo apt-get install linux-restricted-modules-server
sudo apt-get install linux-headers-server
sudo apt-get install linux-image-server linux-server
That's it after rebooting you should be able to see all the memory available in your system.