msvcrt: Added _resetstkoflw implementation

Alexandre Julliard julliard at winehq.org
Tue Apr 19 11:04:49 CDT 2011


Piotr Caban <piotr at codeweavers.com> writes:

> +/*********************************************************************
> + * _resetstkoflw (MSVCRT.@)
> + */
> +int CDECL _resetstkoflw(void)
> +{
> +    MEMORY_BASIC_INFORMATION mbi;
> +    SYSTEM_INFO info;
> +    DWORD prot;
> +    void *alloc;
> +
> +    GetSystemInfo(&info);
> +    if(!VirtualQuery(&mbi, &mbi, sizeof(mbi)))
> +        return 0;
> +
> +    alloc = VirtualAlloc((char*)mbi.BaseAddress, info.dwPageSize, MEM_COMMIT, PAGE_READWRITE);
> +    if(!alloc)
> +        return 0;
> +
> +    return VirtualProtect(alloc, info.dwPageSize, PAGE_GUARD|PAGE_READWRITE, &prot);

This doesn't make sense to me, why do you need a VirtualAlloc in there?
And what about the limits in the TEB?

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list