[PATCH] kernel32: implement GetLargePageMinimum

Alexandre Julliard julliard at winehq.org
Mon Jun 13 06:28:18 CDT 2016


Marcus Meissner <marcus at 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 at winehq.org



More information about the wine-devel mailing list