OSX has a pretty cool tool called
You run it at the command line and it frees up all available memory - slowing your system to a halt in the process.
I often free up 2GB of memory or more after running it.
Is this available for Debian/Ubuntu?
Edited 8/19/12 to add explanation on drop_caches:
Since Kernel 2.6.16, you can control how cache behaves, there are four possible “positions” for the switch.
0 -> Will give the Kernel full control to the cache memory 1 -> Will free the page cache 2 -> Will free dentries and inodes 3 -> Will free dentries and inodes as well as page cache
So, just enter those values to the file