You can force Firefox to use a prefixed amount of your system memory(Ram) by the following tweak:
Type "about:config" in the browser address bar without the quotes and in the filter type “browser.cache” and search for “browser.cache.disk.capacity"
The default is set to 50000, right click on it and select modify
but you can change it , depending on how much memory you have on your computer or how much you want assign to. go for a number around 20000 if you have more than 512MB of ram on your PC.
Reduce RAM usage further for when Firefox is minimized. This setting will move Firefox to your hard drive when you minimize it, taking up much less memory. And there is no noticeable difference in speed when you restore Firefox, so it’s definitely worth a go.
Type "about:config" in the browser address bar without the quotes
Right click anywhere and click on New-> Boolean
Name it “config.trim_on_minimize” without the qoutes.
Toggle it to TRUE and restart Firefox for the settings to take effect.