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
f25dc05e
Commit
f25dc05e
authored
Dec 13, 2011
by
Simon Marlow
Browse files
Fix for a bug in setNumCapabilities
parent
011d6f96
Changes
1
Hide whitespace changes
Inline
Side-by-side
rts/sm/Storage.c
View file @
f25dc05e
...
...
@@ -190,7 +190,7 @@ initStorage( void )
void
storageAddCapabilities
(
nat
from
,
nat
to
)
{
nat
n
,
g
;
nat
n
,
g
,
i
;
if
(
from
>
0
)
{
nurseries
=
stgReallocBytes
(
nurseries
,
to
*
sizeof
(
struct
nursery_
),
...
...
@@ -200,6 +200,12 @@ void storageAddCapabilities (nat from, nat to)
"storageAddCapabilities"
);
}
// we've moved the nurseries, so we have to update the rNursery
// pointers from the Capabilities.
for
(
i
=
0
;
i
<
to
;
i
++
)
{
capabilities
[
i
].
r
.
rNursery
=
&
nurseries
[
i
];
}
/* The allocation area. Policy: keep the allocation area
* small to begin with, even if we have a large suggested heap
* size. Reason: we're going to do a major collection first, and we
...
...
@@ -463,8 +469,7 @@ assignNurseriesToCapabilities (nat from, nat to)
nat
i
;
for
(
i
=
from
;
i
<
to
;
i
++
)
{
capabilities
[
i
].
r
.
rNursery
=
&
nurseries
[
i
];
capabilities
[
i
].
r
.
rCurrentNursery
=
nurseries
[
i
].
blocks
;
capabilities
[
i
].
r
.
rCurrentNursery
=
nurseries
[
i
].
blocks
;
capabilities
[
i
].
r
.
rCurrentAlloc
=
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