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
fe5b19d1
Commit
fe5b19d1
authored
Feb 20, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed MEM_SYSTEM handling to avoid unmapping areas that we didn't mmap.
parent
5ab5e1c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
virtual.c
memory/virtual.c
+11
-7
No files found.
memory/virtual.c
View file @
fe5b19d1
...
...
@@ -771,11 +771,17 @@ LPVOID WINAPI VirtualAlloc(
if
((
type
&
MEM_RESERVE
)
||
!
base
)
{
view_size
=
size
+
(
base
?
0
:
granularity_mask
+
1
);
if
(
type
&
MEM_SYSTEM
)
ptr
=
base
;
else
ptr
=
(
UINT
)
wine_anon_mmap
(
(
LPVOID
)
base
,
view_size
,
VIRTUAL_GetUnixProt
(
vprot
),
0
);
{
if
(
!
(
view
=
VIRTUAL_CreateView
(
base
,
size
,
VFLAG_VALLOC
|
VFLAG_SYSTEM
,
vprot
,
0
)))
{
SetLastError
(
ERROR_OUTOFMEMORY
);
return
NULL
;
}
return
(
LPVOID
)
base
;
}
view_size
=
size
+
(
base
?
0
:
granularity_mask
+
1
);
ptr
=
(
UINT
)
wine_anon_mmap
(
(
LPVOID
)
base
,
view_size
,
VIRTUAL_GetUnixProt
(
vprot
),
0
);
if
(
ptr
==
(
UINT
)
-
1
)
{
SetLastError
(
ERROR_OUTOFMEMORY
);
...
...
@@ -803,9 +809,7 @@ LPVOID WINAPI VirtualAlloc(
SetLastError
(
ERROR_INVALID_ADDRESS
);
return
NULL
;
}
if
(
!
(
view
=
VIRTUAL_CreateView
(
ptr
,
size
,
VFLAG_VALLOC
|
((
type
&
MEM_SYSTEM
)
?
VFLAG_SYSTEM
:
0
),
vprot
,
0
)))
if
(
!
(
view
=
VIRTUAL_CreateView
(
ptr
,
size
,
VFLAG_VALLOC
,
vprot
,
0
)))
{
munmap
(
(
void
*
)
ptr
,
size
);
SetLastError
(
ERROR_OUTOFMEMORY
);
...
...
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