[erlang-questions] Garbage Collection, BEAM memory and Erlang memory
Roberto Ostinelli
roberto@REDACTED
Fri Jan 23 13:27:59 CET 2015
Correct, however just after this call the process gets hibernated so Data
(I assume) is getting gc'ed right away).
On Fri, Jan 23, 2015 at 7:14 AM, Dan Gudmundsson <dangud@REDACTED> wrote:
>
> Binary copy makes a new copy of the binary regardless of size, but it is
> only useful on ref-c binaries,
> and should be used to avoid keeping references to large binaries, when you
> keep and use a small part
> of the original binary. But in this case you make a copy of Data (-2
> bytes) and thus will double up the memory until Data is gc'ed and refc
> reaches zero. So I do not see the point of the above nor of making it a
> list which will
> only explode your memory even more.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150123/21a59810/attachment.htm>
More information about the erlang-questions
mailing list