/* -----------------------------------------------------------------------------
- * $Id: BlockAlloc.c,v 1.7 2000/01/30 10:17:44 simonmar Exp $
+ * $Id: BlockAlloc.c,v 1.10 2001/08/14 13:40:09 sewardj Exp $
*
* (c) The GHC Team 1998-2000
*
*
* ---------------------------------------------------------------------------*/
+#include "PosixSource.h"
#include "Rts.h"
#include "RtsFlags.h"
#include "RtsUtils.h"
void *mblock;
bdescr *bd, **last;
+ ASSERT(n != 0);
+
if (n > BLOCKS_PER_MBLOCK) {
return allocMegaGroup(BLOCKS_TO_MBLOCKS(n));
}
#ifdef DEBUG
p->free = (void *)-1; /* indicates that this block is free */
p->step = NULL;
- p->gen = NULL;
+ p->gen_no = 0;
/* fill the block group with garbage if sanity checking is on */
IF_DEBUG(sanity,memset(p->start, 0xaa, p->blocks * BLOCK_SIZE));
#endif