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
453f7315
Commit
453f7315
authored
Nov 15, 1999
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed allocation rounding for MEM_RESERVE.
parent
bf2b7658
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
virtual.c
memory/virtual.c
+4
-3
No files found.
memory/virtual.c
View file @
453f7315
...
...
@@ -552,12 +552,13 @@ LPVOID WINAPI VirtualAlloc(
if
(
addr
)
{
if
(
type
&
MEM_RESERVE
)
/* Round down to 64k boundary */
base
=
(
(
UINT
)
addr
+
granularity_mask
)
&
~
granularity_mask
;
base
=
(
UINT
)
addr
&
~
granularity_mask
;
else
base
=
ROUND_ADDR
(
addr
);
size
=
(((
UINT
)
addr
+
size
+
page_mask
)
&
~
page_mask
)
-
base
;
if
(
base
+
size
<
base
)
/* Disallow wrap-around */
if
(
(
base
<=
granularity_mask
)
||
(
base
+
size
<
base
))
{
/* disallow low 64k and wrap-around */
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
NULL
;
}
...
...
@@ -636,7 +637,7 @@ LPVOID WINAPI VirtualAlloc(
if
(
!
(
view
=
VIRTUAL_FindView
(
base
))
||
(
base
+
size
>
view
->
base
+
view
->
size
))
{
SetLastError
(
ERROR_INVALID_
PARAMETER
);
SetLastError
(
ERROR_INVALID_
ADDRESS
);
return
NULL
;
}
...
...
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