Last active
October 1, 2019 18:20
-
-
Save akitaonrails/f0cd567a39164447340bbbda24fa68d0 to your computer and use it in GitHub Desktop.
Revisions
-
akitaonrails revised this gist
Oct 1, 2019 . 2 changed files with 15 additions and 21 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,21 +1,3 @@ Unhandled exception: Cannot allocate new fiber stack: Cannot allocate memory (Errno) GC Warning: Failed to expand heap by 2834432 bytes GC Warning: Failed to expand heap by 790528 bytes @@ -33,6 +15,4 @@ Invalid memory access (signal 11) at address 0x60018 [0x5614ba59cd15] ??? [0x5614ba583b42] main +50 [0x7fd6dd442b97] __libc_start_main +231 [0x5614ba57ff1a] _start +42 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ channel = Channel(Int32).new n = 101_000 n.times do |_| spawn do sleep 0.001 # io block 1ms channel.send 1 end end total = 0 n.times do total += channel.receive end -
akitaonrails renamed this gist
Oct 1, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
akitaonrails created this gist
Oct 1, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ ```ruby channel = Channel(Int32).new n = 101_000 n.times do |_| spawn do sleep 0.001 # io block 1ms channel.send 1 end end total = 0 n.times do total += channel.receive end ``` ``` Unhandled exception: Cannot allocate new fiber stack: Cannot allocate memory (Errno) GC Warning: Failed to expand heap by 2834432 bytes GC Warning: Failed to expand heap by 790528 bytes GC Warning: Out of Memory! Heap size: 5 MiB. Returning NULL! Invalid memory access (signal 11) at address 0x60018 [0x5614ba5a4176] ??? [0x5614ba5a3e8f] __crystal_sigfault_handler +479 [0x7fd6dde91890] ??? [0x5614ba5931d5] ??? [0x5614ba59259b] ??? [0x5614ba591a06] ??? [0x5614ba587560] ??? [0x5614ba585272] ??? [0x5614ba59e5db] ??? [0x5614ba59cd15] ??? [0x5614ba583b42] main +50 [0x7fd6dd442b97] __libc_start_main +231 [0x5614ba57ff1a] _start +42 [0x0] ??? ```