Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
e590ad77
Commit
e590ad77
authored
Aug 20, 2012
by
Simon Marlow
Browse files
OS X: use mmap() instead of malloc for allocating the bss (#7040)
parent
2c60015c
Changes
1
Hide whitespace changes
Inline
Side-by-side
rts/Linker.c
View file @
e590ad77
...
...
@@ -6177,8 +6177,13 @@ ocGetNames_MachO(ObjectCode* oc)
if
((
sections
[
i
].
flags
&
SECTION_TYPE
)
==
S_ZEROFILL
)
{
#ifdef USE_MMAP
char
*
zeroFillArea
=
mmapForLinker
(
sections
[
i
].
size
,
MAP_ANONYMOUS
,
-
1
);
memset
(
zeroFillArea
,
0
,
sections
[
i
].
size
);
#else
char
*
zeroFillArea
=
stgCallocBytes
(
1
,
sections
[
i
].
size
,
"ocGetNames_MachO(common symbols)"
);
#endif
sections
[
i
].
offset
=
zeroFillArea
-
image
;
}
...
...
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