Skip to content

Instantly share code, notes, and snippets.

@ursm
Created Oct 14, 2016
Embed
What would you like to do?
_ = (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