[erlang-questions] Read-only binary: does it stay in the same memory location?
Fri Dec 22 00:12:57 CET 2017
No, the binary will not be moved unless there is some scan algorithm
implemented in GC to visit all process heaps, all registers and all stacks
and possibly all ETS tables and update all pointers to a moved binary.
Which i really doubt it is happening. So no, it will never be moved until
2017-12-22 0:10 GMT+01:00 Frank Muller <frank.muller.erl@REDACTED>:
> Hi guys
> Suppose I’ve a big binary (35MB) in the state of my gen_server process X.
> This binary is never shared with any other process, it’s never updated,
> and stays there for lifetime of process X.
> Question: internally, may the VM moves this binary around to different
> memory locations if needed? Or not because this binary is never
> shared/updated ?
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions