[experimental-ims] 0b4c694 reduce some fieldwidths and pack struct http to avoid packing.

Geoff Simmons geoff at varnish-cache.org
Fri Jul 8 11:47:42 CEST 2011


commit 0b4c69419a603a7dadf87e82c5a98e78724ccfb6
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Jun 20 08:39:17 2011 +0000

    reduce some fieldwidths and pack struct http to avoid packing.

diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h
index 0fe1271..48d1456 100644
--- a/bin/varnishd/cache.h
+++ b/bin/varnishd/cache.h
@@ -166,18 +166,17 @@ struct http {
 	unsigned		magic;
 #define HTTP_MAGIC		0x6428b5c9
 
-	struct ws		*ws;
-
-	unsigned char		conds;		/* If-* headers present */
 	enum httpwhence		logtag;
-	int			status;
-	uint8_t			protover;
 
-	unsigned		shd;		/* Size of hd space */
+	struct ws		*ws;
 	txt			*hd;
 	unsigned char		*hdf;
 #define HDF_FILTER		(1 << 0)	/* Filtered by Connection */
-	unsigned		nhd;		/* Next free hd */
+	uint16_t		shd;		/* Size of hd space */
+	uint16_t		nhd;		/* Next free hd */
+	uint16_t		status;
+	uint8_t			protover;
+	uint8_t 		conds;		/* If-* headers present */
 };
 
 /*--------------------------------------------------------------------



More information about the varnish-commit mailing list