Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d0e5b8e2
Commit
d0e5b8e2
authored
Jul 24, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reserve the DOS area in mmap_init if it wasn't already done by the
preloader.
parent
42f1c481
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
2 deletions
+38
-2
mmap.c
libs/wine/mmap.c
+38
-2
No files found.
libs/wine/mmap.c
View file @
d0e5b8e2
...
...
@@ -189,7 +189,7 @@ void *wine_anon_mmap( void *start, size_t size, int prot, int flags )
}
#if
defined(__i386__) && defined(HAVE_MMAP)
#if
def HAVE_MMAP
/***********************************************************************
* reserve_area
...
...
@@ -223,12 +223,37 @@ static void reserve_area( void *addr, void *end )
/***********************************************************************
* reserve_dos_area
*
* Reserve the DOS area (0x00000000-0x00110000).
*/
static
void
reserve_dos_area
(
void
)
{
const
size_t
page_size
=
getpagesize
();
const
size_t
dos_area_size
=
0x110000
;
void
*
ptr
;
/* first page has to be handled specially */
ptr
=
wine_anon_mmap
(
(
void
*
)
page_size
,
dos_area_size
-
page_size
,
PROT_NONE
,
MAP_NORESERVE
);
if
(
ptr
!=
(
void
*
)
page_size
)
{
if
(
ptr
!=
(
void
*
)
-
1
)
munmap
(
ptr
,
dos_area_size
-
page_size
);
return
;
}
/* now add first page with MAP_FIXED */
wine_anon_mmap
(
NULL
,
page_size
,
PROT_NONE
,
MAP_NORESERVE
|
MAP_FIXED
);
wine_mmap_add_reserved_area
(
NULL
,
dos_area_size
);
}
/***********************************************************************
* mmap_init
*/
void
mmap_init
(
void
)
{
struct
reserved_area
*
area
;
struct
list
*
ptr
;
#ifdef __i386__
char
stack
;
char
*
const
stack_ptr
=
&
stack
;
char
*
user_space_limit
=
(
char
*
)
0x80000000
;
...
...
@@ -259,9 +284,20 @@ void mmap_init(void)
reserve_area
(
base
,
0
);
}
else
reserve_area
(
user_space_limit
,
0
);
#endif
/* __i386__ */
/* reserve the DOS area if not already done */
ptr
=
list_head
(
&
reserved_areas
);
if
(
ptr
)
{
area
=
LIST_ENTRY
(
ptr
,
struct
reserved_area
,
entry
);
if
(
!
area
->
base
)
return
;
/* already reserved */
}
reserve_dos_area
();
}
#else
/*
__i386__
*/
#else
/*
HAVE_MMAP
*/
void
mmap_init
(
void
)
{
...
...
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