Marcus Meissner marcus@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.