[erlang-questions] Working with large binaries in the interpreter

Hans Bolinder hans.bolinder@REDACTED
Wed Sep 20 13:41:02 CEST 2006


[Bob Ippolito:]
> It appears to be a bug in io_lib_pretty, where it unconditionally
> decides to use binary_to_list(B) even when it is going to truncate. It
> should be using binary_to_list/3 if size(B) > D... so it ends up
> creating an enormous list.

The bug will be fixed in R11B-2. Thanks for pointing it out.

> Doing results(0) and forgetting the binding for D does not make any
> difference. It will free the 25M binary from the binaries table, but
> it doesn't affect the processes table nor does it get rid of the 16M
> in the binaries table that is unaccounted for...

This is probably due to the fact that the Erlang shell doesn't garbage
collect the binary. There will be a fix in R11B-2 to overcome the
deficiency.

Best regards,

Hans Bolinder, Erlang/OTP



More information about the erlang-questions mailing list