kernel32: Implement GetLargePageMinimum.

Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Marcus Meissner <marcus@jet.franken.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Austin English 2016-06-15 23:43:46 +02:00 committed by Alexandre Julliard
parent d90f29d817
commit 4d313e6475
4 changed files with 30 additions and 2 deletions

View File

@ -3,7 +3,7 @@
@ stdcall CreateFileMappingW(long ptr long long long wstr) kernel32.CreateFileMappingW
@ stdcall CreateMemoryResourceNotification(long) kernel32.CreateMemoryResourceNotification
@ stdcall FlushViewOfFile(ptr long) kernel32.FlushViewOfFile
@ stub GetLargePageMinimum
@ stdcall GetLargePageMinimum() kernel32.GetLargePageMinimum
@ stub GetProcessWorkingSetSizeEx
@ stdcall GetSystemFileCacheSize(ptr ptr ptr) kernel32.GetSystemFileCacheSize
@ stdcall GetWriteWatch(long ptr long ptr ptr ptr) kernel32.GetWriteWatch

View File

@ -291,3 +291,15 @@ err:
}
return TRUE;
}
/***********************************************************************
* GetLargePageMinimum (KERNEL32.@)
*/
SIZE_T WINAPI GetLargePageMinimum(void)
{
#if defined(__i386___) || defined(__x86_64__)
return 2 * 1024 * 1024;
#endif
FIXME("Not implemented on your platform/architecture.\n");
return 0;
}

View File

@ -696,7 +696,7 @@
@ stdcall GetHandleInformation(long ptr)
@ stub -i386 GetLSCallbackTarget
@ stub -i386 GetLSCallbackTemplate
# @ stub GetLargePageMinimum
@ stdcall GetLargePageMinimum()
@ stdcall GetLargestConsoleWindowSize(long)
@ stdcall GetLastError()
@ stub GetLinguistLangSize

View File

@ -88,6 +88,7 @@ static BOOL (WINAPI *pProcess32Next)(HANDLE, PROCESSENTRY32*);
static BOOL (WINAPI *pThread32First)(HANDLE, THREADENTRY32*);
static BOOL (WINAPI *pThread32Next)(HANDLE, THREADENTRY32*);
static BOOL (WINAPI *pGetLogicalProcessorInformationEx)(LOGICAL_PROCESSOR_RELATIONSHIP,SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX*,DWORD*);
static SIZE_T (WINAPI *pGetLargePageMinimum)(void);
/* ############################### */
static char base[MAX_PATH];
@ -252,6 +253,7 @@ static BOOL init(void)
pThread32First = (void *)GetProcAddress(hkernel32, "Thread32First");
pThread32Next = (void *)GetProcAddress(hkernel32, "Thread32Next");
pGetLogicalProcessorInformationEx = (void *)GetProcAddress(hkernel32, "GetLogicalProcessorInformationEx");
pGetLargePageMinimum = (void *)GetProcAddress(hkernel32, "GetLargePageMinimum");
return TRUE;
}
@ -3138,6 +3140,19 @@ static void test_GetLogicalProcessorInformationEx(void)
HeapFree(GetProcessHeap(), 0, info);
}
static void test_largepages(void)
{
SIZE_T size;
if (!pGetLargePageMinimum) {
skip("No GetLargePageMinimum support.\n");
return;
}
size = pGetLargePageMinimum();
ok((size == 0) || (size == 2*1024*1024) || (size == 4*1024*1024), "GetLargePageMinimum reports %ld size\n", size);
}
START_TEST(process)
{
HANDLE job;
@ -3210,6 +3225,7 @@ START_TEST(process)
test_GetNumaProcessorNode();
test_session_info();
test_GetLogicalProcessorInformationEx();
test_largepages();
/* things that can be tested:
* lookup: check the way program to be executed is searched