13 Jun
2016
13 Jun
'16
11:28 a.m.
Marcus Meissner <marcus(a)jet.franken.de> writes:
+SIZE_T WINAPI GetLargePageMinimum(void) +{ +#ifdef linux + FILE *f; + unsigned long hugepagesize = 0; + + f = fopen( "/proc/meminfo", "r" ); + if (f) + { + char buffer[256]; + + while (fgets( buffer, sizeof(buffer), f )) + { + if (sscanf( buffer, "Hugepagesize: %lu", &hugepagesize )) + break; + } + fclose( f ); + } + return (SIZE_T)hugepagesize*1024; +#else + FIXME("stub: not implemented on your platform.\n"); + return 0; +#endif
This could probably be simply hard-coded based on the CPU architecture. -- Alexandre Julliard julliard(a)winehq.org