/* -----------------------------------------------------------------------------
- * $Id: GC.c,v 1.82 2000/05/23 13:57:53 simonmar Exp $
+ * $Id: GC.c,v 1.86 2000/11/01 11:41:47 simonmar Exp $
*
* (c) The GHC Team 1998-1999
*
# include "ParallelDebug.h"
# endif
#endif
+#if defined(GHCI)
+# include "HsFFI.h"
+# include "Linker.h"
+#endif
+#if defined(RTS_GTK_FRONTPANEL)
+#include "FrontPanel.h"
+#endif
//@node STATIC OBJECT LIST, Static function declarations, Includes
//@subsection STATIC OBJECT LIST
*/
bdescr *old_to_space;
-
/* Data used for allocation area sizing.
*/
lnat new_blocks; /* blocks allocated during this GC */
CCCS = CCS_GC;
#endif
- /* Approximate how much we allocated */
+ /* Approximate how much we allocated.
+ * Todo: only when generating stats?
+ */
allocated = calcAllocated();
/* Figure out which generation to collect
major_gc = (N == RtsFlags.GcFlags.generations-1);
}
+#ifdef RTS_GTK_FRONTPANEL
+ if (RtsFlags.GcFlags.frontpanel) {
+ updateFrontPanelBeforeGC(N);
+ }
+#endif
+
/* check stack sanity *before* GC (ToDo: check all threads) */
#if defined(GRAN)
// ToDo!: check sanity IF_DEBUG(sanity, checkTSOsSanity());
/* check for memory leaks if sanity checking is on */
IF_DEBUG(sanity, memInventory());
+#ifdef RTS_GTK_VISUALS
+ if (RtsFlags.GcFlags.visuals) {
+ updateFrontPanelAfterGC( N, live );
+ }
+#endif
+
/* ok, GC over: tell the stats department what happened. */
stat_endGC(allocated, collected, live, copied, N);
}
selectee = ((StgEvacuated *)selectee)->evacuee;
goto selector_loop;
+ case AP_UPD:
case THUNK:
case THUNK_1_0:
case THUNK_0_1:
/* relocate the stack pointers... */
new_tso->su = (StgUpdateFrame *) ((StgPtr)new_tso->su + diff);
new_tso->sp = (StgPtr)new_tso->sp + diff;
- new_tso->splim = (StgPtr)new_tso->splim + diff;
relocate_TSO(tso, new_tso);