/* -----------------------------------------------------------------------------
*
- * (c) The GHC Team 2001
+ * (c) The GHC Team 2001-2006
*
* Compacting garbage collector
*
+ * Documentation on the architecture of the Garbage Collector can be
+ * found in the online commentary:
+ *
+ * http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/Storage/GC
+ *
* ---------------------------------------------------------------------------*/
#include "PosixSource.h"
#include "RtsUtils.h"
#include "RtsFlags.h"
#include "OSThreads.h"
-#include "Storage.h"
-#include "Stable.h"
#include "BlockAlloc.h"
#include "MBlock.h"
#include "GC.h"
// know the destination without the size, because we may
// spill into the next block. So we have to run down the
// threaded list and get the info ptr first.
+ //
+ // ToDo: one possible avenue of attack is to use the fact
+ // that if (p&BLOCK_MASK) >= (free&BLOCK_MASK), then we
+ // definitely have enough room. Also see bug #1147.
info = get_threaded_info(p);
q = p;