Purge command - Unable to purge disk buffers, error #-2?
Privilege needed

On Mountain Lion purge can be run from a normal user account.

On Mavericks purge can only be run from root account (through sudo).
If you attempt to run it with a normal user account, you will get an error message:

Unable to purge disk buffers: Operation not permitted


Real function

purge doesn't act directly on main memory.
Its core function is to terminate all the IO pending which are using disk cache and then to
free all the occupied disk cache.

purge should free disk space to ease paging out and swapping out of main memory. Hence many people get convinced that purge was freeing main memory. This is an urban legend.

Real fault

This problem is clearly coming directly from the MacOS X kernel.
It might be caused by programs doing a lot of I/O on a system where the virtual memory is already heavily used. But these programs are false culprits.

You may find such a false culprit exhibited here: Mountain Lion Panic - decode

A kernel panic is a kernel fault. The type of error message is a kernel error message. It is a kernel fault.

From your actual context, I advise you to run sysdiagnose and open a bug case at Apple with the result. This tool will run for you all the relevant tools to analyze any misbehaviour of your system or anny application running on it.

Please read this professionnal answer: Apple sysdiagnose