Skip to content
Snippets Groups Projects
Commit 74041e1c authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 1999-03-26 14:54:43 by simonm]

Fix bug in allocGroup() when allocating an entire megablock in one go.
parent d4e0cee2
No related merge requests found
/* -----------------------------------------------------------------------------
* $Id: BlockAlloc.c,v 1.4 1999/02/05 16:02:35 simonm Exp $
* $Id: BlockAlloc.c,v 1.5 1999/03/26 14:54:43 simonm Exp $
*
* (c) The GHC Team 1998-1999
*
......@@ -88,8 +88,10 @@ allocGroup(nat n)
initMBlock(mblock); /* initialise the start fields */
bd = FIRST_BDESCR(mblock);
initGroup(n,bd); /* we know the group will fit */
initGroup(BLOCKS_PER_MBLOCK-n, bd+n);
freeGroup(bd+n); /* add the rest on to the free list */
if (n < BLOCKS_PER_MBLOCK) {
initGroup(BLOCKS_PER_MBLOCK-n, bd+n);
freeGroup(bd+n); /* add the rest on to the free list */
}
return bd;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment