Skip to content

Instantly share code, notes, and snippets.

@julien51
Forked from astro/nokogiri-memleak.rb
Created April 23, 2009 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save julien51/100748 to your computer and use it in GitHub Desktop.
Save julien51/100748 to your computer and use it in GitHub Desktop.
require "rubygems"
require 'nokogiri'
doc = Nokogiri::XML::Document.new
loop do
puts `ps -o rss= -p #{Process.pid}`.to_i
n = Nokogiri::XML::Element.new('e', doc)
n.add_namespace(nil, 'http://example.com')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment