X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FGCCompact.c;h=ea2e474a1dd797e3fd0dc0f62197259c4f3702b8;hb=80498a8a061475f74b2c093dfe97d454387581b8;hp=70937f64e2dc2b90cb75ad6bba56735b5f7b90ba;hpb=dd33e044e1dcc1952f2ab380946a417930a79816;p=ghc-hetmet.git diff --git a/ghc/rts/GCCompact.c b/ghc/rts/GCCompact.c index 70937f6..ea2e474 100644 --- a/ghc/rts/GCCompact.c +++ b/ghc/rts/GCCompact.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GCCompact.c,v 1.10 2001/10/19 09:41:11 sewardj Exp $ + * $Id: GCCompact.c,v 1.12 2002/03/12 11:51:06 simonmar Exp $ * * (c) The GHC Team 2001 * @@ -510,7 +510,9 @@ static void update_fwd_compact( bdescr *blocks ) { StgPtr p, q, free; +#if 0 StgWord m; +#endif bdescr *bd, *free_bd; StgInfoTable *info; nat size; @@ -735,7 +737,9 @@ static nat update_bkwd_compact( step *stp ) { StgPtr p, free; +#if 0 StgWord m; +#endif bdescr *bd, *free_bd; StgInfoTable *info; nat size, free_blocks; @@ -845,7 +849,6 @@ compact( void (*get_roots)(evac_fn) ) { nat g, s, blocks; step *stp; - extern StgWeak *old_weak_ptr_list; // tmp // 1. thread the roots get_roots((evac_fn)thread); @@ -867,6 +870,17 @@ compact( void (*get_roots)(evac_fn) ) // the global thread list thread((StgPtr)&all_threads); + // any threads resurrected during this GC + thread((StgPtr)&resurrected_threads); + + // the main threads list + { + StgMainThread *m; + for (m = main_threads; m != NULL; m = m->link) { + thread((StgPtr)&m->tso); + } + } + // the static objects thread_static(scavenged_static_objects);