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
d7d94ed0
Commit
d7d94ed0
authored
Mar 03, 2023
by
Brendan Shanks
Committed by
Alexandre Julliard
Mar 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Implement DiscardVirtualMemory().
parent
7f7f06fe
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
1 deletion
+16
-1
kernel32.spec
dlls/kernel32/kernel32.spec
+1
-0
kernelbase.spec
dlls/kernelbase/kernelbase.spec
+1
-1
memory.c
dlls/kernelbase/memory.c
+13
-0
memoryapi.h
include/memoryapi.h
+1
-0
No files found.
dlls/kernel32/kernel32.spec
View file @
d7d94ed0
...
...
@@ -371,6 +371,7 @@
@ stdcall -import DeleteProcThreadAttributeList(ptr)
# @ stub DisableThreadProfiling
@ stdcall DisassociateCurrentThreadFromCallback(ptr) NTDLL.TpDisassociateCallback
@ stdcall DiscardVirtualMemory(ptr long) kernelbase.DiscardVirtualMemory
@ stdcall DeleteTimerQueue(long)
@ stdcall -import DeleteTimerQueueEx(long long)
@ stdcall -import DeleteTimerQueueTimer(long long long)
...
...
dlls/kernelbase/kernelbase.spec
View file @
d7d94ed0
...
...
@@ -269,7 +269,7 @@
@ stdcall DisablePredefinedHandleTableInternal(long)
@ stdcall DisableThreadLibraryCalls(long)
@ stdcall DisassociateCurrentThreadFromCallback(ptr) ntdll.TpDisassociateCallback
# @ stub DiscardVirtualMemory
@ stdcall DiscardVirtualMemory(ptr long)
@ stdcall DisconnectNamedPipe(long)
@ stdcall DnsHostnameToComputerNameExW(wstr ptr ptr)
# @ stub DsBindWithSpnExW
...
...
dlls/kernelbase/memory.c
View file @
d7d94ed0
...
...
@@ -53,6 +53,19 @@ BOOLEAN WINAPI RtlSetUserValueHeap( HANDLE handle, ULONG flags, void *ptr, void
/***********************************************************************
* DiscardVirtualMemory (kernelbase.@)
*/
DWORD
WINAPI
DECLSPEC_HOTPATCH
DiscardVirtualMemory
(
void
*
addr
,
SIZE_T
size
)
{
NTSTATUS
status
;
LPVOID
ret
=
addr
;
status
=
NtAllocateVirtualMemory
(
GetCurrentProcess
(),
&
ret
,
0
,
&
size
,
MEM_RESET
,
PAGE_NOACCESS
);
return
RtlNtStatusToDosError
(
status
);
}
/***********************************************************************
* FlushViewOfFile (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
FlushViewOfFile
(
const
void
*
base
,
SIZE_T
size
)
...
...
include/memoryapi.h
View file @
d7d94ed0
...
...
@@ -41,5 +41,6 @@ typedef struct WIN32_MEMORY_REGION_INFORMATION
SIZE_T
CommitSize
;
}
WIN32_MEMORY_REGION_INFORMATION
;
DWORD
WINAPI
DiscardVirtualMemory
(
void
*
addr
,
SIZE_T
size
);
BOOL
WINAPI
QueryVirtualMemoryInformation
(
HANDLE
process
,
const
void
*
addr
,
WIN32_MEMORY_INFORMATION_CLASS
info_class
,
void
*
info
,
SIZE_T
size
,
SIZE_T
*
ret_size
);
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