Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
aa8efe32
Commit
aa8efe32
authored
Apr 16, 2008
by
simonmarhaskell@gmail.com
Browse files
tmp: alloc one block at a time
parent
30387408
Changes
1
Hide whitespace changes
Inline
Side-by-side
rts/sm/GCUtils.c
View file @
aa8efe32
...
...
@@ -35,6 +35,7 @@ allocBlock_sync(void)
}
#if 0
static void
allocBlocks_sync(nat n, bdescr **hd, bdescr **tl,
nat gen_no, step *stp,
...
...
@@ -56,6 +57,7 @@ allocBlocks_sync(nat n, bdescr **hd, bdescr **tl,
*tl = &bd[n-1];
RELEASE_SPIN_LOCK(&gc_alloc_block_sync);
}
#endif
void
freeChain_sync
(
bdescr
*
bd
)
...
...
@@ -204,7 +206,7 @@ todo_block_full (nat size, step_workspace *ws)
StgPtr
alloc_todo_block
(
step_workspace
*
ws
,
nat
size
)
{
bdescr
*
bd
,
*
hd
,
*
tl
;
bdescr
*
bd
/*
, *hd, *tl
*/
;
// Grab a part block if we have one, and it has enough room
if
(
ws
->
part_list
!=
NULL
&&
...
...
@@ -216,14 +218,22 @@ alloc_todo_block (step_workspace *ws, nat size)
}
else
{
allocBlocks_sync
(
4
,
&
hd
,
&
tl
,
ws
->
step
->
gen_no
,
ws
->
step
,
BF_EVACUATED
);
tl
->
link
=
ws
->
part_list
;
ws
->
part_list
=
hd
->
link
;
ws
->
n_part_blocks
+=
3
;
bd
=
hd
;
// blocks in to-space get the BF_EVACUATED flag.
// allocBlocks_sync(4, &hd, &tl,
// ws->step->gen_no, ws->step, BF_EVACUATED);
//
// tl->link = ws->part_list;
// ws->part_list = hd->link;
// ws->n_part_blocks += 3;
//
// bd = hd;
bd
=
allocBlock_sync
();
bd
->
step
=
ws
->
step
;
bd
->
gen_no
=
ws
->
step
->
gen_no
;
bd
->
flags
=
BF_EVACUATED
;
bd
->
u
.
scan
=
bd
->
free
=
bd
->
start
;
}
bd
->
link
=
NULL
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment