Created
March 4, 2020 22:10
-
-
Save QuinnWilton/0836bd6c05b32aa2f2b7a6308c424541 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
defmodule BeamWorkshop do | |
def start() do | |
spawn(&process_loop/0) | |
end | |
def process_loop() do | |
big_data = | |
for _ <- 1..1024 do | |
big_data(1_048_576) | |
end | |
:erlang.garbage_collect() | |
receive do | |
after | |
:infinity -> :ok | |
end | |
big_data | |
end | |
def big_data(n) do | |
<<0::size(n)>> | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment