Skip to content

Instantly share code, notes, and snippets.

@QuinnWilton
Created March 4, 2020 22:10
Show Gist options
  • Save QuinnWilton/0836bd6c05b32aa2f2b7a6308c424541 to your computer and use it in GitHub Desktop.
Save QuinnWilton/0836bd6c05b32aa2f2b7a6308c424541 to your computer and use it in GitHub Desktop.
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