kernelbase: Implement DiscardVirtualMemory().
This commit is contained in:
parent
7f7f06fe61
commit
d7d94ed0df
4 changed files with 16 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -52,6 +52,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.@)
|
||||
*/
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue