Piotr Caban <piotr(a)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(a)winehq.org