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
f3e70ee0
Commit
f3e70ee0
authored
Nov 18, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Get rid of the Wine-specific MEM_SYSTEM flag.
parent
f4eaa15a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
32 deletions
+11
-32
virtual.c
dlls/ntdll/virtual.c
+11
-29
winnt.h
include/winnt.h
+0
-3
No files found.
dlls/ntdll/virtual.c
View file @
f3e70ee0
...
...
@@ -1605,32 +1605,23 @@ NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG zero_
/* Compute the alloc type flags */
if
(
!
(
type
&
MEM_SYSTEM
))
if
(
!
(
type
&
(
MEM_COMMIT
|
MEM_RESERVE
))
||
(
type
&
~
(
MEM_COMMIT
|
MEM_RESERVE
|
MEM_TOP_DOWN
|
MEM_WRITE_WATCH
|
MEM_RESET
)))
{
if
(
!
(
type
&
(
MEM_COMMIT
|
MEM_RESERVE
))
||
(
type
&
~
(
MEM_COMMIT
|
MEM_RESERVE
|
MEM_TOP_DOWN
|
MEM_WRITE_WATCH
|
MEM_RESET
)))
{
WARN
(
"called with wrong alloc type flags (%08x) !
\n
"
,
type
);
return
STATUS_INVALID_PARAMETER
;
}
if
(
type
&
MEM_WRITE_WATCH
)
{
FIXME
(
"MEM_WRITE_WATCH type not supported
\n
"
);
return
STATUS_INVALID_PARAMETER
;
}
WARN
(
"called with wrong alloc type flags (%08x) !
\n
"
,
type
);
return
STATUS_INVALID_PARAMETER
;
}
if
(
type
&
MEM_WRITE_WATCH
)
{
FIXME
(
"MEM_WRITE_WATCH type not supported
\n
"
);
return
STATUS_INVALID_PARAMETER
;
}
/* Reserve the memory */
if
(
use_locks
)
server_enter_uninterrupted_section
(
&
csVirtual
,
&
sigset
);
if
(
type
&
MEM_SYSTEM
)
{
if
(
type
&
MEM_IMAGE
)
vprot
|=
VPROT_IMAGE
|
VPROT_NOEXEC
;
status
=
create_view
(
&
view
,
base
,
size
,
vprot
|
VPROT_COMMITTED
|
VPROT_SYSTEM
);
if
(
status
==
STATUS_SUCCESS
)
base
=
view
->
base
;
}
else
if
((
type
&
MEM_RESERVE
)
||
!
base
)
if
((
type
&
MEM_RESERVE
)
||
!
base
)
{
status
=
map_view
(
&
view
,
base
,
size
,
mask
,
type
&
MEM_TOP_DOWN
,
vprot
);
if
(
status
==
STATUS_SUCCESS
)
base
=
view
->
base
;
...
...
@@ -1707,7 +1698,7 @@ NTSTATUS WINAPI NtFreeVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T *si
base
=
ROUND_ADDR
(
addr
,
page_mask
);
/* avoid freeing the DOS area when a broken app passes a NULL pointer */
if
(
!
base
&&
!
(
type
&
MEM_SYSTEM
)
)
return
STATUS_INVALID_PARAMETER
;
if
(
!
base
)
return
STATUS_INVALID_PARAMETER
;
server_enter_uninterrupted_section
(
&
csVirtual
,
&
sigset
);
...
...
@@ -1717,15 +1708,6 @@ NTSTATUS WINAPI NtFreeVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T *si
{
status
=
STATUS_INVALID_PARAMETER
;
}
else
if
(
type
&
MEM_SYSTEM
)
{
/* return the values that the caller should use to unmap the area */
*
addr_ptr
=
view
->
base
;
if
(
!
wine_mmap_is_in_reserved_area
(
view
->
base
,
view
->
size
))
*
size_ptr
=
view
->
size
;
else
*
size_ptr
=
0
;
/* make sure we don't munmap anything from a reserved area */
view
->
protect
|=
VPROT_SYSTEM
;
delete_view
(
view
);
}
else
if
(
type
==
MEM_RELEASE
)
{
/* Free the pages */
...
...
include/winnt.h
View file @
f3e70ee0
...
...
@@ -575,9 +575,6 @@ typedef struct _MEMORY_BASIC_INFORMATION
#define MEM_PHYSICAL 0x00400000
#define MEM_LARGE_PAGES 0x20000000
#define MEM_4MB_PAGES 0x80000000
#ifdef __WINESRC__
#define MEM_SYSTEM 0x80000000
#endif
#define SEC_FILE 0x00800000
#define SEC_IMAGE 0x01000000
...
...
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