On Fri, Jul 8, 2022 at 7:08 PM Ivan Zhakov <i...@visualsvn.com> wrote: > > On Tue, 25 Jan 2022 at 20:34, <yla...@apache.org> wrote: > > > > - 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, APLOGNO(00355) > > - "Child: CreateThread failed. Unable to " > > + workers[i].num = i; > > + workers[i].handle = CreateEvent(NULL, TRUE, FALSE, NULL); > > + if (!workers[i].handle) { > > + rv = apr_get_os_error(); > > + } > > + else { > > + apr_threadattr_t *thread_attr = NULL; > > + apr_threadattr_create(&thread_attr, pchild); > > + if (ap_thread_stacksize != 0) { > > + apr_threadattr_stacksize_set(thread_attr, > > + ap_thread_stacksize); > > + } > > + rv = ap_thread_create(&workers[i].thd, thread_attr, > > + worker_thread, &workers[i], pchild); > > This is performance regression: before this change stack memory was > 'reserved'. See stack_res_flag in CreateThread call. Now stack memory > is committed.
So STACK_SIZE_PARAM_IS_A_RESERVATION needs to go to apr_thread_create()? > > > > while (threads_created) > > { > > - HANDLE handle = child_handles[threads_created - 1]; > > + struct worker_info *info = workers[threads_created - 1]; > > This code doesn't compile: > [[[ > server\mpm\winnt\child.c(1210,1): error C2440: 'initializing': cannot > convert from 'worker_info' to 'worker_info *' > ]]] r1902636, hopefully. Regards; Yann.