Commit 9500e189 authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

Reimplement ThreadStackSize to behave as on unix for any

Windows 2003/2008 (XP/Vista) servers.  Virtual allocations
will only consume pages once referenced, while the page
alignment will vary by ThreadStackSize setting so that the
maximum number of threads and minimum stack VM profile will
be wasted.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@699481 13f79535-47bb-0310-9956-ffa450edef68
parent 9e112590
Loading
Loading
Loading
Loading
+5 −4
Changes for server/mpm/winnt/child.c: 5 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -984,13 +984,14 @@ void child_main(apr_pool_t *pconf)
                continue;
            }
            ap_update_child_status_from_indexes(0, i, SERVER_STARTING, NULL);
            child_handles[i] = (HANDLE) _beginthreadex(
                                            NULL, (unsigned)ap_thread_stacksize,
                                            worker_main, (void *) i, 0, &tid);
        
            child_handles[i] = CreateThread(NULL, ap_thread_stacksize,
                                            worker_main, (void *) i,
                                            stack_res_flag, &tid);
            if (child_handles[i] == 0) {
                ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(),
                             ap_server_conf,
                             "Child %d: _beginthreadex failed. Unable to "
                             "Child %d: CreateThread failed. Unable to "
                             "create all worker threads. Created %d of the %d "
                             "threads requested with the ThreadsPerChild "
                             "configuration directive.",