Very often I get out of memory error. Even sometimes Linux becomes hanging and I'm sure it 'cause there is no enough memory. As I've tryed to understand why is it I can suppose to reasons. One of them is that some application seizes too much memory and I can suspect JRE. I've not understand what is JRE but OpenOffice always asks for JRE that isn't installed and the message contains only OK button. I've not solved what to do with it and I can suppose that it can seize too much memory, but I've not succeeded to check it. The second reason can be incorrect swap configuration. The only thing I've undestand looking over the Web is that I need to look for the output
swapon -s
Filename                                Type            Size    Used    Priority
That's what I get running this command. What does it really means - I'm not sure (especially 'cause there is a lot of information over the Web about swap files but I use a swap partition). I'm not sure does the command above shows some information only about swap files or also about swap partitions.

Tell me please how can I check which application seizes what quantity of memory and how it's better to configure swap properly if it isn't configured so.