/* -----------------------------------------------------------------------------
- * $Id: Storage.c,v 1.74 2003/01/23 12:13:12 simonmar Exp $
+ * $Id: Storage.c,v 1.75 2003/01/29 10:28:56 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
StgPtr alloc_Hp = NULL; /* next free byte in small_alloc_list */
StgPtr alloc_HpLim = NULL; /* end of block at small_alloc_list */
-generation *generations; /* all the generations */
-generation *g0; /* generation 0, for convenience */
-generation *oldest_gen; /* oldest generation, for convenience */
-step *g0s0; /* generation 0, step 0, for convenience */
+generation *generations = NULL; /* all the generations */
+generation *g0 = NULL; /* generation 0, for convenience */
+generation *oldest_gen = NULL; /* oldest generation, for convenience */
+step *g0s0 = NULL; /* generation 0, step 0, for convenience */
lnat total_allocated = 0; /* total memory allocated during run */
step *stp;
generation *gen;
+ if (generations != NULL) {
+ // multi-init protection
+ return;
+ }
+
/* Sanity check to make sure the LOOKS_LIKE_ macros appear to be
* doing something reasonable.
*/