Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Beetham
wine
Commits
453f7315
Commit
453f7315
authored
25 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Fixed allocation rounding for MEM_RESERVE.
parent
bf2b7658
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
memory/virtual.c
+4
-3
4 additions, 3 deletions
memory/virtual.c
with
4 additions
and
3 deletions
memory/virtual.c
+
4
−
3
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
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment