An escript
$ rebar3 escriptize
$ _build/default/bin/mem_test 1000000
erlang fragmented memory test code