Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
1b3e1423
Commit
1b3e1423
authored
Oct 18, 1999
by
Richard Henderson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ggc-page.c (init_ggc): Work around SunOS unaligned mmap bug.
From-SVN: r30070
parent
3da5522a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
gcc/ggc-page.c
+20
-0
No files found.
gcc/ggc-page.c
View file @
1b3e1423
...
...
@@ -797,6 +797,26 @@ init_ggc ()
G
.
allocated_last_gc
=
GGC_MIN_LAST_ALLOCATED
;
#ifdef HAVE_MMAP
/* StunOS has an amazing off-by-one error for the first mmap allocation
after fiddling with RLIMIT_STACK. The result, as hard as it is to
believe, is an unaligned page allocation, which would cause us to
hork badly if we tried to use it. */
{
char
*
p
=
alloc_anon
(
NULL
,
G
.
pagesize
);
if
((
size_t
)
p
&
(
G
.
pagesize
-
1
))
{
/* How losing. Discard this one and try another. If we still
can't get something useful, give up. */
p
=
alloc_anon
(
NULL
,
G
.
pagesize
);
if
((
size_t
)
p
&
(
G
.
pagesize
-
1
))
abort
();
}
munmap
(
p
,
G
.
pagesize
);
}
#endif
empty_string
=
ggc_alloc_string
(
""
,
0
);
ggc_add_string_root
(
&
empty_string
,
1
);
}
...
...
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