Your question also gives the answer. You must have more ram. PS is a powerful application and requires a lot of live memory. When using Photoshop all other applications should be closed, especially so if you apply filters. Memory will also be taxed depending upon the picture format you are working on.
How much ram does your computer have? I would say that with photoshop 1gb to 1.5 gb ram is the minimum depending on how much work you are doing on the same file. Of course if you have several files open, more ram are being consumed. You must close them.