Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f974c859
Commit
f974c859
authored
May 28, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure that we can initialize the DOS memory area correctly even if it
has been pre-reserved already.
parent
5ae62e3d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
dosmem.c
dlls/kernel/dosmem.c
+12
-9
No files found.
dlls/kernel/dosmem.c
View file @
f974c859
...
...
@@ -308,17 +308,20 @@ static void setup_dos_mem( int dos_init )
{
int
sys_offset
=
0
;
int
page_size
=
getpagesize
();
void
*
addr
=
wine_anon_mmap
(
(
void
*
)
page_size
,
0x110000
-
page_size
,
PROT_READ
|
PROT_WRITE
|
PROT_EXEC
,
0
);
if
(
addr
==
(
void
*
)
page_size
)
/* we got what we wanted */
void
*
addr
=
NULL
;
if
(
wine_mmap_is_in_reserved_area
(
NULL
,
0x110000
)
!=
1
)
{
addr
=
wine_anon_mmap
(
(
void
*
)
page_size
,
0x110000
-
page_size
,
PROT_READ
|
PROT_WRITE
|
PROT_EXEC
,
0
);
if
(
addr
==
(
void
*
)
page_size
)
addr
=
NULL
;
/* we got what we wanted */
else
munmap
(
addr
,
0x110000
-
page_size
);
}
if
(
!
addr
)
{
/* now map from address 0 */
addr
=
wine_anon_mmap
(
NULL
,
0x110000
,
PROT_READ
|
PROT_WRITE
|
PROT_EXEC
,
MAP_FIXED
);
if
(
addr
)
{
ERR
(
"MAP_FIXED failed at address 0 for DOS address space
\n
"
);
ExitProcess
(
1
);
}
wine_anon_mmap
(
NULL
,
0x110000
,
PROT_READ
|
PROT_WRITE
|
PROT_EXEC
,
MAP_FIXED
);
/* inform the memory manager that there is a mapping here */
VirtualAlloc
(
addr
,
0x110000
,
MEM_RESERVE
|
MEM_SYSTEM
,
PAGE_EXECUTE_READWRITE
);
...
...
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