From a5b4d31ab5ad2ed24cdb53ffa92679411b4176b0 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Thu, 21 Jan 2021 11:41:47 +0100 Subject: [PATCH] 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. --- project.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 -- 2.39.2