Force minimum stack size to 1Mb for Xlib.
This commit is contained in:
parent
76adb1ff0d
commit
746d900b04
|
@ -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 New Issue