There is no way to flush the RAM caches/VM that I know of, and I've asked - People will tell you that it's useless, but it's helpful when you're running out of disk space on the boot volume (perhaps a nasty memory leak) or more importantly when a process has eaten all of your RAM and the system's data has all been paged to disk so everything operates extremely slowly until everything eventually gets sorted out (this is easily seen on windows, play a new game then quit it with 512mb of RAM).
There is a myth that Mac Janitor, among other programs, "cleans up" the state of RAM. It does not. It manually runs the cron scripts (cron being a program that runs maintenance scripts in /etc/crontab at certain times. anacron runs them after certain time has elapsed, which is better for a desktop/laptop system that is not on 24/7), the thing that causes this is when certain things are updated (the lookupdb database) it uses a lot of RAM, and when it completes it's task the RAM no longer in use, making it look like the RAM has been "cleaned". If your computer is not on all the time, use anacron or manually use any of the many GUI tools that call on cron every couple months to ensure that your log files get rotated and compressed to save a little disk space.