[erlang-questions] Understanding binary heap garbage collection

Ward Bekker (TTY) <>
Fri Nov 23 09:57:05 CET 2012


After an operation with binaries, and manual requesting a garbage collect, the binary heap does not shrink to it's former size. See my test sequence below. About 1.5 MB is added to the binary heap, and never garbage collected. What can be the cause?



Erlang R15B02 (erts-5.9.2) [source] [64-bit] [smp:2:2] [async-threads:0] [hipe] [kernel-poll:false] [dtrace]

Eshell V5.9.2  (abort with ^G)
1> erlang:memory().

2> lists:foldl(fun(_I, Acc) -> <<Acc/binary, Acc/binary>> end, <<"abc">>, lists:seq(0,21)).

3> erlang:memory().

4> erlang:garbage_collect().

5> erlang:memory().

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121123/7e40e2ef/attachment.htm>

More information about the erlang-questions mailing list