X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FCompact.h;h=efd7351b5805d86ea776ca88feaed773b030c139;hb=81c95f7d9854521a568179bb19199299835b7a53;hp=4f1d6a27c72bd098a3af7bff03f2f5c239f9b562;hpb=ab0e778ccfde61aed4c22679b24d175fc6cc9bf3;p=ghc-hetmet.git diff --git a/rts/sm/Compact.h b/rts/sm/Compact.h index 4f1d6a2..efd7351 100644 --- a/rts/sm/Compact.h +++ b/rts/sm/Compact.h @@ -1,43 +1,20 @@ /* ----------------------------------------------------------------------------- * - * (c) The GHC Team 1998-2005 + * (c) The GHC Team 1998-2008 * * 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 + * * ---------------------------------------------------------------------------*/ -#ifndef GCCOMPACT_H -#define GCCOMPACT_H - -INLINE_HEADER rtsBool -mark_stack_empty(void) -{ - return mark_sp == mark_stack; -} - -INLINE_HEADER rtsBool -mark_stack_full(void) -{ - return mark_sp >= mark_splim; -} - -INLINE_HEADER void -reset_mark_stack(void) -{ - mark_sp = mark_stack; -} - -INLINE_HEADER void -push_mark_stack(StgPtr p) -{ - *mark_sp++ = p; -} +#ifndef SM_COMPACT_H +#define SM_COMPACT_H -INLINE_HEADER StgPtr -pop_mark_stack(void) -{ - return *--mark_sp; -} +BEGIN_RTS_PRIVATE INLINE_HEADER void mark(StgPtr p, bdescr *bd) @@ -69,6 +46,8 @@ is_marked(StgPtr p, bdescr *bd) return (*bitmap_word & bit_mask); } -void compact(void); +void compact (StgClosure *static_objects); + +END_RTS_PRIVATE -#endif /* GCCOMPACT_H */ +#endif /* SM_COMPACT_H */