mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:13:56 +00:00
Force minimum stack size to 1Mb for Xlib.
This commit is contained in:
parent
76adb1ff0d
commit
746d900b04
2 changed files with 2 additions and 0 deletions
|
@ -62,6 +62,7 @@ TEB *THREAD_InitStack( TEB *teb, DWORD stack_size )
|
|||
void *base;
|
||||
|
||||
stack_size = (stack_size + (page_size - 1)) & ~(page_size - 1);
|
||||
if (stack_size < 1024 * 1024) stack_size = 1024 * 1024; /* Xlib needs a large stack */
|
||||
|
||||
if (!(base = VirtualAlloc( NULL, stack_size, MEM_COMMIT, PAGE_EXECUTE_READWRITE )))
|
||||
return NULL;
|
||||
|
|
|
@ -259,6 +259,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, const SECURITY_DESCRIPTOR *
|
|||
}
|
||||
if (stack_reserve < stack_commit) stack_reserve = stack_commit;
|
||||
stack_reserve = (stack_reserve + 0xffff) & ~0xffff; /* round to 64K boundary */
|
||||
if (stack_reserve < 1024 * 1024) stack_reserve = 1024 * 1024; /* Xlib needs a large stack */
|
||||
|
||||
info->stack_base = NULL;
|
||||
info->stack_size = stack_reserve;
|
||||
|
|
Loading…
Reference in a new issue