]> granicus.if.org Git - apache/commitdiff
Allocate iols out of the ptrans pool rather than mallocing them out
authorBill Stoddard <stoddard@apache.org>
Wed, 5 Jul 2000 19:40:39 +0000 (19:40 +0000)
committerBill Stoddard <stoddard@apache.org>
Wed, 5 Jul 2000 19:40:39 +0000 (19:40 +0000)
of the heap. The extra malloc/free is a significant performance
hit on some platforms and repeatedly alloc/freeing small chunks of storage
can fragment the heap.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85770 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/beos/beos.c
server/mpm/dexter/dexter.c
server/mpm/mpmt_beos/mpmt_beos.c
server/mpm/mpmt_pthread/mpmt_pthread.c
server/mpm/prefork/prefork.c
server/mpm/spmt_os2/spmt_os2.c
server/mpm/winnt/mpm_winnt.c

index 02a293f551662bac0716f4e6e47fceea39eb3d06..c4c7041f42e40bd6ff54d481d89c5d0f94ad7ebc 100644 (file)
@@ -388,7 +388,7 @@ static void process_socket(ap_pool_t *p, ap_socket_t *sock, int my_child_num)
            return;
     }
     
-    iol = ap_iol_attach_socket(sock);
+    iol = ap_iol_attach_socket(p, sock);
     if (iol == NULL) {
         ap_log_error(APLOG_MARK, APLOG_WARNING, errno, NULL,
           "error attaching to socket");
index 6545eaa565f7e2f77db6333a94fb15f79309c8e6..1faf0bca4a0f7cb490198d39865b9fea02507dcb 100644 (file)
@@ -504,7 +504,7 @@ static void process_socket(ap_pool_t *p, ap_socket_t *sock, long conn_id)
     }
 
     sock_disable_nagle(csd);
-    iol = ap_iol_attach_socket(sock);
+    iol = ap_iol_attach_socket(p, sock);
     conn_io = ap_bcreate(p, B_RDWR);
     ap_bpush_iol(conn_io, iol);
 
index b491fb810818541f5afc83b1265b6f58d356f176..2421bf06f6882afcc585c48e161397776f23be1d 100644 (file)
@@ -365,7 +365,7 @@ static void process_socket(ap_pool_t *p, ap_socket_t *sock, int my_child_num, in
     long conn_id = my_child_num * HARD_THREAD_LIMIT + my_thread_num;
     int csd;
 
-    iol = ap_iol_attach_socket(sock);
+    iol = ap_iol_attach_socket(p, sock);
     if (iol == NULL) {
         if (errno == EBADF) {
             ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, errno, NULL,
index f036c469bf994b71c152dbf95b408017b6f6a2e1..69cdfbb2e0c9fa04911392df4c25acc71f030e23 100644 (file)
@@ -499,7 +499,7 @@ static void process_socket(ap_pool_t *p, ap_socket_t *sock, int my_child_num, in
 
     sock_disable_nagle(csd);
 
-    iol = ap_iol_attach_socket(sock);
+    iol = ap_iol_attach_socket(p, sock);
 
     (void) ap_update_child_status(my_child_num, my_thread_num,  
                                  SERVER_BUSY_READ, (request_rec *) NULL);
index c4279ba48112935262966d6ec2d3ff507249a3c8..555227df31b91fc5e0eb8a6d96a7c403943a3221 100644 (file)
@@ -1039,7 +1039,7 @@ static void child_main(int child_num_arg)
 
        sock_disable_nagle(sockdes);
 
-       iol = ap_iol_attach_socket(csd);
+       iol = ap_iol_attach_socket(ptrans, csd);
        (void) ap_update_child_status(my_child_num, SERVER_BUSY_READ,
                                   (request_rec *) NULL);
 
index 38a8cadf44be8cf144b20e012c3aa0495ffd05e3..65d34a2138461f98796dd1c2ecb29c510bc98a3b 100644 (file)
@@ -994,7 +994,7 @@ static void child_main(void *child_num_arg)
 
        sock_disable_nagle(csd);
 
-        iol = ap_iol_attach_socket(csd);
+        iol = ap_iol_attach_socket(ptrans, csd);
 
        if (iol == NULL) {
           ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, NULL,
index 492ab748ea75b23a23f7f2941ad199c4d52f43af..a587e4001001e28e519f9c5ee7f50ce8558cfa81 100644 (file)
@@ -1085,7 +1085,7 @@ static void worker_main(int child_num)
         sock_disable_nagle(context->accept_socket);
         ap_put_os_sock(&context->sock, &context->accept_socket, context->ptrans);
 
-        iol = ap_iol_attach_socket(context->sock);
+        iol = ap_iol_attach_socket(context->ptrans, context->sock);
         if (iol == NULL) {
             ap_log_error(APLOG_MARK, APLOG_ERR, APR_ENOMEM, server_conf,
                          "worker_main: attach_socket() failed. Continuing...");