Update as of 2023: This add-on is now depreciated
Mozilla Firefox can get sluggish after a while and often lock up. This can be because it takes up a lot of memory when in use and then not free it up (called a memory leak).
Memory Fox is a useful add-on that reduces the memory usage of Firefox and in turn helps improve browsing performance. Download and install it from here.
Once installed, enable it by selecting Tools > Memory Fox > Activate Memory Fox – Browser Only.
There will be a green icon displayed to the left of address bar. Simply hovering mouse over it will show the current memory usage status.
Also, there are other options which can be configured through Tools > Memory Fox > Options like blacklisting / blocking specific processes from applying memory recovery actions by this add-on.
By the way, Memory Fox is based on project Memshrink from Mozilla which aims to reduce the memory consumption of Firefox. To see detailed info about this, Memshrink wiki is a good place.