On Tue, Aug 19, 2008 at 9:46 PM, Sven C. Koehler <schween / snafu.de> wrote:

> def rss_leaks
>  /^VmRSS:\s+(\d+)/m.match(File.open("/proc/#{$$}/status") {|f|
>      f.read })[1].to_i
> end

No idea about the leak, just wanted to point out for the archives that
/m does nothing there because there's no dot.

/m in Ruby is /s in Perl ("." matches "\n"), and Perl's /m (multi-line
mode) is always on in Ruby, there's no way to switch that one off. ^
is always beginning of line, and you assert beginning of string with
\A. To tangle this a little more /s in Ruby exists and means the
regexp is written in the SJIS encoding.