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
181cf8b6
Commit
181cf8b6
authored
Oct 12, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loader: Make sure the reserved area is protected on MacOSX too.
parent
e958dc2e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
main.c
loader/main.c
+25
-4
No files found.
loader/main.c
View file @
181cf8b6
...
...
@@ -18,12 +18,20 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
#include "wine/library.h"
#include "main.h"
#ifdef __APPLE__
asm
(
".zerofill WINE_DOS, WINE_DOS, ___wine_dos, 0x60000000"
);
asm
(
".zerofill WINE_SHARED_HEAP, WINE_SHARED_HEAP, ___wine_shared_heap, 0x02000000"
);
extern
char
__wine_dos
[
0x60000000
],
__wine_shared_heap
[
0x02000000
];
...
...
@@ -34,10 +42,24 @@ static const struct wine_preload_info wine_main_preload_info[] =
{
__wine_shared_heap
,
sizeof
(
__wine_shared_heap
)
},
/* shared user data + shared heap */
{
0
,
0
}
/* end of list */
};
#else
static
inline
void
reserve_area
(
void
*
addr
,
size_t
size
)
{
wine_anon_mmap
(
addr
,
size
,
PROT_NONE
,
MAP_FIXED
|
MAP_NORESERVE
);
wine_mmap_add_reserved_area
(
addr
,
size
);
}
#else
/* __APPLE__ */
/* the preloader will set this variable */
const
struct
wine_preload_info
*
wine_main_preload_info
=
NULL
;
#endif
static
inline
void
reserve_area
(
void
*
addr
,
size_t
size
)
{
wine_mmap_add_reserved_area
(
addr
,
size
);
}
#endif
/* __APPLE__ */
/**********************************************************************
* main
...
...
@@ -50,8 +72,7 @@ int main( int argc, char *argv[] )
if
(
wine_main_preload_info
)
{
for
(
i
=
0
;
wine_main_preload_info
[
i
].
size
;
i
++
)
wine_mmap_add_reserved_area
(
wine_main_preload_info
[
i
].
addr
,
wine_main_preload_info
[
i
].
size
);
reserve_area
(
wine_main_preload_info
[
i
].
addr
,
wine_main_preload_info
[
i
].
size
);
}
wine_pthread_set_functions
(
&
pthread_functions
,
sizeof
(
pthread_functions
)
);
...
...
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