Resident Memory Size Logging

Hello:

Is there a way to get the resident memory size of the rails process in- code using ruby? I'd like to have my application log the size of its own memory.

Thank you in advance,

Dan

BTW, this is one way of doing it under Linux:

Opening “/proc/$pid/status” and looking for VmSize.

Not sure if there is a more efficient.

Dan