Created
October 14, 2016 10:53
-
-
Save ursm/00961eafc4e18ae9a84244bdeb14b757 to your computer and use it in GitHub Desktop.
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
_ = (0..1000000).to_a.map {|i| i * 2 } | |
# _ = (0..1000000).to_a.map! {|i| i * 2 } | |
puts File.read("/proc/#{Process.pid}/status").lines.grep(/^VmHWM:/) | |
# map => VmHWM: 25408 kB | |
# map! => VmHWM: 17544 kB |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment