Skip to content

Instantly share code, notes, and snippets.

@clifff
Created April 27, 2013 01:31
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 clifff/5471511 to your computer and use it in GitHub Desktop.
Save clifff/5471511 to your computer and use it in GitHub Desktop.
1.9.3p392 :003 > arr = []; arr[10000000000000001] = 1
irb(16545,0x7fff795b9180) malloc: *** mmap(size=80000000000004096) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
irb(16545,0x7fff795b9180) malloc: *** mmap(size=80000000000004096) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
NoMemoryError: failed to allocate memory
from (irb):3:in `[]='
from (irb):3
from /Users/clifff/./.rvm/rubies/ruby-1.9.3-p392/bin/irb:16:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment