Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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