Re: squid-2.4 release ?

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 09 Jan 2001 02:38:10 +0100

Adrian Chadd wrote:

> You could start by changing sdirno into a byte instead of an int.
> That chops 3 bytes (on 32 bit archs) out per StoreEntry.

Done (and moved things around to account for alignment).

Now the structure on 32-bit platforms looks like
8 hash_link hash; /* must be first */
4 MemObject *mem_obj;
4 RemovalPolicyNode repl;
4 time_t timestamp;
4 time_t lastref;
4 time_t expires;
4 time_t lastmod;
4 size_t swap_file_sz;
4 sfileno swap_filen;
2 u_short refcount;
2 u_short flags;
2 u_short lock_count; /* Assume < 65536! */
    mem_status_t mem_status:3;
    ping_status_t ping_status:3;
    store_status_t store_status:3;
2 swap_status_t swap_status:3;
1 sdirno swap_dirn;
===
49

but due to alignment requirements the structure is 52 bytes regardless..
(+ 4 bytes malloc overhead, 56 in total). We need to kill one more byte
to gain anything from this.

/Henrik
Received on Mon Jan 08 2001 - 18:38:13 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:14 MST