Created
March 20, 2011 19:39
-
-
Save subelsky/878603 to your computer and use it in GitHub Desktop.
Possible memory leak in therubyracer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rubygems" | |
require "v8" | |
require "ostruct" | |
require "memprof" | |
funcs = [] | |
3.times do | |
cxt = V8::Context.new | |
funcs << cxt.eval("f = function(arg) { return arg.a + arg.b }") | |
end | |
blank = Object.new | |
Memprof.track do | |
1000.times do | |
funcs.each do |func| | |
func.methodcall(blank,OpenStruct.new(:a => 1, :b => 2)) | |
end | |
end | |
while !V8::C::V8::IdleNotification(); end | |
GC.start | |
end | |
#12000 /Users/subelsky/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/ostruct.rb:83:__node__ | |
#12000 /Users/subelsky/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/ostruct.rb:83:Proc | |
#12000 /Users/subelsky/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/ostruct.rb:82:__node__ | |
#12000 /Users/subelsky/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/ostruct.rb:82:Proc | |
#6000 /Users/subelsky/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/ostruct.rb:81:__varmap__ | |
#6000 /Users/subelsky/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/ostruct.rb:51:__scope__ | |
#6000 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal/functions.rb:38:V8::C::Function | |
#6000 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal/functions.rb:38:String | |
#6000 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal/functions.rb:38:Hash | |
#6000 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal/functions.rb:28:V8::C::FunctionTemplate | |
#6000 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal/functions.rb:28:String | |
#6000 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal/functions.rb:28:Proc | |
#6000 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal/functions.rb:28:Hash | |
#6000 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal/functions.rb:10:__scope__ | |
#6000 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:246:__scope__ | |
#6000 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:201:Proc | |
#6000 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/function.rb:10:__scope__ | |
#6000 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/function.rb:10:V8::C::String | |
#6000 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/function.rb:10:V8::C::AccessorInfo | |
#6000 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/function.rb:10:Hash | |
#6000 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/access.rb:8:UnboundMethod | |
#3003 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:46:V8::C::Object | |
#3003 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:46:Hash | |
#3000 bin/memcheck.rb:18:OpenStruct | |
#3000 /Users/subelsky/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/ostruct.rb:81:Class | |
#3000 /Users/subelsky/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/ostruct.rb:47:Hash | |
#30 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:174:String | |
#30 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:167:String | |
#12 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:20:__varmap__ | |
#6 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:46:__varmap__ | |
#6 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:21:__varmap__ | |
#6 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:21:V8::C::FunctionTemplate | |
#6 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:21:String | |
#6 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:21:Proc | |
#6 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:21:Hash | |
#6 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:174:Hash | |
#6 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:167:Hash | |
#4 bin/memcheck.rb:17:__varmap__ | |
#4 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:35:String | |
#3 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:35:MatchData | |
#2 bin/memcheck.rb:18:__scope__ | |
#2 bin/memcheck.rb:16:__varmap__ | |
#1 bin/memcheck.rb:18:Hash | |
#1 bin/memcheck.rb:18:Array | |
#1 bin/memcheck.rb:15:__varmap__ | |
#1 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal/functions.rb:10:String | |
#1 /Users/subelsky/.rvm/gems/ruby-1.8.7-p330@exp-world/bundler/gems/therubyracer-67a1cc5c9ef6/lib/v8/portal.rb:84:String |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment