summaryrefslogtreecommitdiff
path: root/src/base.h
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2021-07-28 04:35:54 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2021-09-08 15:06:06 -0400
commit81a107b4e61c6ee9606f7f68d035248d326a6205 (patch)
tree23aeab413b57e45060203b21cd8c18589b8f3013 /src/base.h
parent5a58f6963cc93801b49268bfe2b59d8e6bfe3f10 (diff)
downloadlighttpd-git-81a107b4e61c6ee9606f7f68d035248d326a6205.tar.gz
[core] change srv->conns to doubly-linked-list
avoids separate memory allocation for list of pointers
Diffstat (limited to 'src/base.h')
-rw-r--r--src/base.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/base.h b/src/base.h
index 8a43ab1b..7fe324dd 100644
--- a/src/base.h
+++ b/src/base.h
@@ -21,7 +21,6 @@ struct connection {
h2con *h2;
int fd; /* the FD for this connection */
- uint32_t ndx; /* reverse mapping to server->connection[ndx] */
fdnode *fdn; /* fdevent (fdnode *) object */
/* fd states */
@@ -62,6 +61,7 @@ struct connection {
int keep_alive_idle; /* remember max_keep_alive_idle from config */
connection *next;
+ connection *prev;
};
typedef struct {
@@ -153,7 +153,6 @@ struct server {
/* buffers */
buffer *tmp_buf;
- connections conns;
connections joblist_A;
connections joblist_B;
connections fdwaitqueue;
@@ -171,6 +170,7 @@ struct server {
int sockets_disabled;
uint32_t lim_conns;
+ connection *conns;
connection *conns_pool;
log_error_st *errh;