]> granicus.if.org Git - apache/commitdiff
Update the mpms to call the new allocator/pools API
authorSander Striker <striker@apache.org>
Fri, 15 Mar 2002 00:50:31 +0000 (00:50 +0000)
committerSander Striker <striker@apache.org>
Fri, 15 Mar 2002 00:50:31 +0000 (00:50 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93943 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/beos/beos.c
server/mpm/netware/mpm_netware.c
server/mpm/prefork/prefork.c
server/mpm/worker/worker.c

index 25bfe5de2520d5d64e7822ab000962c9ac272a40..a703d8e506f1fbaeb0a32b3ab81b370168892fb5 100644 (file)
@@ -359,6 +359,7 @@ static int32 worker_thread(void * dummy)
     proc_info * ti = dummy;
     int child_slot = ti->slot;
     apr_pool_t *tpool = ti->tpool;
+    apr_allocator_t *allocator;
     apr_socket_t *csd = NULL;
     apr_pool_t *ptrans;                /* Pool for per-transaction stuff */
     apr_socket_t *sd = NULL;
@@ -378,7 +379,10 @@ static int32 worker_thread(void * dummy)
     sigfillset(&sig_mask);
     sigprocmask(SIG_BLOCK, &sig_mask, NULL);
 
-    apr_pool_create_ex(&ptrans, tpool, NULL, APR_POOL_FNEW_ALLOCATOR);
+    apr_allocator_create(&allocator);
+    apr_pool_create_ex(&ptrans, tpool, NULL, allocator);
+    apr_allocator_set_owner(ptrans);
+
     apr_pool_tag(ptrans, "transaction");
 
     apr_lock_acquire(worker_thread_count_mutex);
index c1b45d1b308841f432c0ad698cbd7de3f85e5d13..2b519d4c4bdfe22d4c01502f71cafc4c6a137dab 100644 (file)
@@ -352,6 +352,7 @@ void worker_main(void *arg)
     ap_listen_rec *lr;
     ap_listen_rec *last_lr = NULL;
     apr_pool_t *ptrans;
+    apr_allocator_t *allocator;
     conn_rec *current_conn;
     apr_status_t stat = APR_EINIT;
     int worker_num_arg = (int)arg;
@@ -369,7 +370,10 @@ void worker_main(void *arg)
     tv.tv_sec = 1;
     tv.tv_usec = 0;
 
-    apr_pool_create_ex(&ptrans, NULL, NULL, APR_POOL_FNEW_ALLOCATOR);
+    apr_allocator_create(&allocator);
+    apr_pool_create_ex(&ptrans, NULL, NULL, allocator);
+    apr_allocator_set_owner(allocator, ptrans);
+
     apr_pool_tag(ptrans, "transaction");
 
     apr_thread_mutex_lock(worker_thread_count_mutex);
index a1c07ddb6cc33abcadef032c3666c67b7bcf7efb..5fb2109ffd6987cb9531f62123c02c253a42d2db 100644 (file)
@@ -518,6 +518,7 @@ int ap_graceful_stop_signalled(void)
 static void child_main(int child_num_arg)
 {
     apr_pool_t *ptrans;
+    apr_allocator_t *allocator;
     conn_rec *current_conn;
     apr_status_t status = APR_EINIT;
     int i;
@@ -537,7 +538,9 @@ static void child_main(int child_num_arg)
     /* Get a sub context for global allocations in this child, so that
      * we can have cleanups occur when the child exits.
      */
-    apr_pool_create_ex(&pchild, pconf, NULL, APR_POOL_FNEW_ALLOCATOR);
+    apr_allocator_create(&allocator);
+    apr_pool_create_ex(&pchild, pconf, NULL, allocator);
+    apr_allocator_set_owner(allocator, pchild);
 
     apr_pool_create(&ptrans, pchild);
     apr_pool_tag(ptrans, "transaction");
index cd4d8f880417c8f87368a52ad7e6fbd76f5331b7..2e1223ca4ffe3e5e32ff25dcfafe269fdd24a83a 100644 (file)
@@ -679,7 +679,11 @@ static void *listener_thread(apr_thread_t *thd, void * dummy)
         if (!workers_may_exit) {
             /* create a new transaction pool for each accepted socket */
             if (recycled_pool == NULL) {
-                apr_pool_create_ex(&ptrans, NULL, NULL, APR_POOL_FNEW_ALLOCATOR);
+                apr_allocator_t *allocator;
+
+                apr_allocator_create(&allocator);
+                apr_pool_create_ex(&ptrans, NULL, NULL, allocator);
+                apr_allocator_set_owner(allocator, ptrans);
             }
             else {
                 ptrans = recycled_pool;