Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
bb288695
Commit
bb288695
authored
Oct 15, 2002
by
simonmar
Browse files
[project @ 2002-10-15 11:02:32 by simonmar]
Slight fix to the allocated memory calculation
parent
bd881529
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/rts/Storage.c
View file @
bb288695
/* -----------------------------------------------------------------------------
* $Id: Storage.c,v 1.6
8
2002/0
8
/1
6
1
3:20
:3
6
simonmar Exp $
* $Id: Storage.c,v 1.6
9
2002/
1
0/1
5
1
1:02
:3
2
simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
...
...
@@ -533,7 +533,15 @@ allocate( nat n )
lnat
allocated_bytes
(
void
)
{
return
(
alloc_blocks
*
BLOCK_SIZE_W
-
(
alloc_HpLim
-
alloc_Hp
));
lnat
allocated
;
allocated
=
alloc_blocks
*
BLOCK_SIZE_W
-
(
alloc_HpLim
-
alloc_Hp
);
if
(
pinned_object_block
!=
NULL
)
{
allocated
-=
(
pinned_object_block
->
start
+
BLOCK_SIZE_W
)
-
pinned_object_block
->
free
;
}
return
allocated
;
}
/* ---------------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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