/* Must be static since it's referenced after the stack and frame
pointer registers have been changed. */
static PVOID allocationbase;
- SIZE_T commitsize = in_forkee ? (PBYTE) fork_info->stackbase
- - (PBYTE) fork_info->stacklimit
- : 0;
- PVOID stackaddr = create_new_main_thread_stack (allocationbase,
- commitsize);
+ PVOID stackaddr = create_new_main_thread_stack (allocationbase);
if (stackaddr)
{
/* Set stack pointer to new address. Set frame pointer to
maintained by the thr_alloc class. See the description in the x86_64-only
code in _dll_crt0 to understand why we have to do this. */
PVOID
-create_new_main_thread_stack (PVOID &allocationbase, SIZE_T parent_commitsize)
+create_new_main_thread_stack (PVOID &allocationbase)
{
PIMAGE_DOS_HEADER dosheader;
PIMAGE_NT_HEADERS ntheader;
allocationbase
= thr_alloc.alloc (ntheader->OptionalHeader.SizeOfStackReserve);
guardsize = wincap.def_guard_page_size ();
- if (parent_commitsize)
- commitsize = (SIZE_T) parent_commitsize;
- else
- commitsize = ntheader->OptionalHeader.SizeOfStackCommit;
+ commitsize = ntheader->OptionalHeader.SizeOfStackCommit;
commitsize = roundup2 (commitsize, wincap.page_size ());
if (commitsize > stacksize - guardsize - wincap.page_size ())
commitsize = stacksize - guardsize - wincap.page_size ();
#define check_iovec_for_write(a, b) check_iovec ((a), (b), true)
#ifdef __x86_64__
-extern PVOID create_new_main_thread_stack (PVOID &allocationbase,
- SIZE_T parent_commitsize);
+extern PVOID create_new_main_thread_stack (PVOID &allocationbase);
#endif
extern "C" DWORD WINAPI pthread_wrapper (PVOID arg);