Fix small stats bug in the -G1 case.
/* -----------------------------------------------------------------------------
- * $Id: Main.c,v 1.3 1999/01/21 10:31:47 simonm Exp $
+ * $Id: Main.c,v 1.4 1999/02/26 16:44:13 simonm Exp $
*
* (c) The GHC Team 1998-1999
*
case Interrupted:
/* carry on */
}
+ /* run all threads */
+ run_all_threads();
shutdownHaskell();
stg_exit(EXIT_SUCCESS);
}
/* -----------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.10 1999/02/26 12:32:51 simonm Exp $
+ * $Id: Schedule.c,v 1.11 1999/02/26 16:44:13 simonm Exp $
*
* (c) The GHC Team, 1998-1999
*
enteredCAFs = END_CAF_LIST;
}
+void
+run_all_threads ( void )
+{
+ while (run_queue_hd != END_TSO_QUEUE) {
+ schedule(run_queue_hd, NULL);
+ }
+}
+
/* -----------------------------------------------------------------------------
Main scheduling loop.
/* -----------------------------------------------------------------------------
- * $Id: Storage.c,v 1.14 1999/02/23 17:18:01 simonm Exp $
+ * $Id: Storage.c,v 1.15 1999/02/26 16:44:14 simonm Exp $
*
* (c) The GHC Team, 1998-1999
*
step *step;
if (RtsFlags.GcFlags.generations == 1) {
- live = g0s0->to_blocks * BLOCK_SIZE_W +
+ live = (g0s0->to_blocks - 1) * BLOCK_SIZE_W +
((lnat)g0s0->hp_bd->free - (lnat)g0s0->hp_bd->start) / sizeof(W_);
return live;
}
}
step = &generations[g].steps[s];
live += (step->n_blocks - 1) * BLOCK_SIZE_W +
- ((lnat)step->hp_bd->free -(lnat)step->hp_bd->start) / sizeof(W_);
+ ((lnat)step->hp_bd->free - (lnat)step->hp_bd->start) / sizeof(W_);
}
}
return live;