Created
November 1, 2010 09:49
-
-
Save balinterdi/657909 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 'memprof' | |
| class Dumb | |
| @@big_dumb_array = [] | |
| def initialize | |
| @@big_dumb_array << [0] * 100_000 | |
| end | |
| end | |
| if __FILE__ == $0 | |
| # watch with top (or something similar) as the ruby process | |
| # eats all of your memory... | |
| while true | |
| dumb = Dumb.new | |
| dumb = nil | |
| GC.start | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment