From: Fabian Keil <fk@fabiankeil.de>
Date: Thu, 21 Jan 2021 10:41:47 +0000 (+0100)
Subject: Rearrange struct client_state to reduce memory on amd64
X-Git-Tag: v_3_0_30~52
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/faq/@default-cgi@/developer-manual/static/coding.html?a=commitdiff_plain;h=a5b4d31ab5ad2ed24cdb53ffa92679411b4176b0;p=privoxy.git

Rearrange struct client_state to reduce memory on amd64

Move content_type up and change ssl_with_server_is_opened
and ssl_with_client_is_opened to short.
---

diff --git a/project.h b/project.h
index 15805e87..d82c85d8 100644
--- a/project.h
+++ b/project.h
@@ -1005,6 +1005,9 @@ struct client_state
    /** Multi-purpose flag container, see CSP_FLAG_* above */
    unsigned int flags;
 
+   /** MIME-Type key, see CT_* above */
+   unsigned int content_type;
+
    /** Client PC's IP address, as reported by the accept() function.
        As a string. */
    char *ip_addr_str;
@@ -1070,9 +1073,6 @@ struct client_state
    char *client_address;
 #endif
 
-   /** MIME-Type key, see CT_* above */
-   unsigned int content_type;
-
    /** Actions files associated with this client */
    struct file_list *actions_list[MAX_AF_FILES];
 
@@ -1135,8 +1135,8 @@ struct client_state
     * Thanks to this flags, we can call function to close both connections
     * and we don't have to care about more details.
     */
-   int ssl_with_server_is_opened;
-   int ssl_with_client_is_opened;
+   short int ssl_with_server_is_opened;
+   short int ssl_with_client_is_opened;
 
    /*
     * Server certificate chain of trust including strings with certificates