Skip to content

Instantly share code, notes, and snippets.

@benweint
Last active August 29, 2015 14:15
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 benweint/412cb89b2e139e25fa90 to your computer and use it in GitHub Desktop.
Save benweint/412cb89b2e139e25fa90 to your computer and use it in GitHub Desktop.
rbx allocation counting
#!/usr/bin/env ruby
def log_allocated_objects
value = Rubinius::Metrics.data[:'memory.large.objects.total']
puts "memory.large.objects.total = #{value}, class = #{value.class}"
end
loop do
log_allocated_objects
10000.times { Object.new }
sleep 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment