how to run out of memory: let binaries leverage the heap
Matthias Lang
matthias@REDACTED
Thu Sep 26 21:05:10 CEST 2002
Laszlo Varga writes:
> Hi,
> sorry for my stupidity, but I've been thought that
> tail recursion needs constant space (as it is a loop).
> Then why binary garbage?
Tail recursion gets you a constant number of stack frames. Typically,
it also gets you constant _stack_ space. The data in my function
consists of binaries (which are allocated from a special pool) and
references to the binaries (which are allocated from the heap).
Matthias
More information about the erlang-questions
mailing list