<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>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?</div><div><br></div><div>/W</div><div><br></div><div>=========<br><div><br></div><div>Erlang R15B02 (erts-5.9.2) [source] [64-bit] [smp:2:2] [async-threads:0] [hipe] [kernel-poll:false] [dtrace]<br><br>Eshell V5.9.2 (abort with ^G)<br>1> <b>erlang:memory().</b><br>[{total,9654968},<br> {processes,1123090},<br> {processes_used,1123090},<br> {system,8531878},<br> {atom,194289},<br> {atom_used,176885},<br> {binary,1319320},<br> {code,3892513},<br> {ets,298400}]</div><div><br>2> <b>lists:foldl(fun(_I, Acc) -> <<Acc/binary, Acc/binary>> end, <<"abc">>, lists:seq(0,21)).</b><br><<"abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcab"…>></div><div><br>3> <b>erlang:memory().</b><br>[{total,22340920},<br> {processes,1127984},<br> {processes_used,1127970},<br> {system,21212936},<br> {atom,202481},<br> {atom_used,186083},<br> {binary,13901920},<br> {code,3972848},<br> {ets,302504}]</div><div><br>4> <b>erlang:garbage_collect().</b><br>true</div><div><br>5> <b>erlang:memory().</b><br>[{total,22314232},<br> {processes,1100552},<br> {processes_used,1100538},<br> {system,21213680},<br> {atom,202481},<br> {atom_used,186083},<br> {binary,13902664},<br> {code,3972848},<br> {ets,302504}]<br>6> </div><div><br></div></div></body></html>