Repository : ssh://g...@git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/c519f24319c3296bda7d3ed53c53e9b09398dad5/ghc
>--------------------------------------------------------------- commit c519f24319c3296bda7d3ed53c53e9b09398dad5 Author: Edward Z. Yang <ezy...@mit.edu> Date: Sun Oct 6 21:31:52 2013 -0700 More clarity on CurrentAlloc docs. Signed-off-by: Edward Z. Yang <ezy...@mit.edu> >--------------------------------------------------------------- c519f24319c3296bda7d3ed53c53e9b09398dad5 rts/sm/Storage.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c index db834e6..d419714 100644 --- a/rts/sm/Storage.c +++ b/rts/sm/Storage.c @@ -706,6 +706,28 @@ allocate (Capability *cap, W_ n) // we have a block in the nursery: take it and put // it at the *front* of the nursery list, and use it // to allocate() from. + // + // Previously the nursery looked like this: + // + // CurrentNursery + // / + // +-+ +-+ + // nursery -> ... |A| -> |B| -> ... + // +-+ +-+ + // + // After doing this, it looks like this: + // + // CurrentNursery + // / + // +-+ +-+ + // nursery -> |B| -> ... -> |A| -> ... + // +-+ +-+ + // \ + // CurrentAlloc + // + // The point is to get the block out of the way of the + // advancing CurrentNursery pointer, while keeping it + // on the nursery list so we don't lose track of it. cap->r.rCurrentNursery->link = bd->link; if (bd->link != NULL) { bd->link->u.back = cap->r.rCurrentNursery; _______________________________________________ ghc-commits mailing list ghc-commits@haskell.org http://www.haskell.org/mailman/listinfo/ghc-commits