[PATCH] kernel32: implement GetLargePageMinimum
Marcus Meissner
marcus at jet.franken.de
Tue Jun 14 01:12:47 CDT 2016
From: Austin English <austinenglish at gmail.com>
https://bugs.winehq.org/show_bug.cgi?id=18745
Report 2MB minimum page size on i386.
This assumes that all x86 processors and the 64/32bit emulation mode
have hugetable support and it is always enabled.
Signed-off-by: Marcus Meissner <marcus at jet.franken.de>
Signed-off-by: Austin English <austinenglish at gmail.com>
---
dlls/kernel32/cpu.c | 15 +++++++++++++++
dlls/kernel32/kernel32.spec | 2 +-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c
index f48fcf0..a0ef6aa 100644
--- a/dlls/kernel32/cpu.c
+++ b/dlls/kernel32/cpu.c
@@ -291,3 +291,18 @@ err:
}
return TRUE;
}
+
+/***********************************************************************
+ * GetLargePageMinimum (KERNEL32.@)
+ */
+SIZE_T WINAPI GetLargePageMinimum(void)
+{
+#ifdef linux
+#ifdef __i386__
+ /* Linux x86 hugepages are 2 MB */
+ return 2*1024*1024;
+#endif
+#endif
+ FIXME("stub: not implemented on your platform/architecture.\n");
+ return 0;
+}
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index ec7155b6e..0fc4dcb 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -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
--
2.8.3
More information about the wine-patches
mailing list