[erlang-questions] refactoring a very large record
Thu Oct 20 22:12:45 CEST 2011
But rather then "mark-and-sweep" that is hinted at here, erlang runtime
system uses a copying collector.
Without going in to gritty details, anything that can be reached from a
rootset (stack, registers and a few other things) are live data and copied
to a new heap. The old heap is then deallocated.
2011/10/20 Jesper Louis Andersen <jesper.louis.andersen@REDACTED>
> On Thu, Oct 20, 2011 at 18:38, Matthew Sackman <matthew@REDACTED>
> > I don't know how Erlang does it, but one approach is that from all your
> > processes stacks, traverse all pointers and mark all found terms as
> > "visited" (transitively). Then, work through everything in the heap and
> > anything not marked "visited" can be reclaimed.
> > With erlang's heap-per-process memory model and plus generational GC, I
> > could imagine this would work fairly well, but I've no idea whether this
> > is actually what's used.
> This is what is used, to my knowledge.
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions