Code:
Memory: Total Used Free Shared Buffers Cached
Mem: 513304 281164 232140 1512 46972 110912
Swap: 257000 0 257000
ok, what's the problem, you have 500mb of ram, of which 110mb is currently being used as cache and 47mb is being used for actual buffered data. looks fine to me, you're more than 90% free. maybe you need to find out a tiny bit about linux memory management....