Hi,
+ uint32_t mask_size; /* mask size in bytes */
+ uint64_t capacity; /* expected maximum for .count, not a hard
limit */
+ int8_t bits_per_entry; /* number of bits allocated for each entry
from capacity */
int count; /* number of digested entries */
int del_count; /* number of deletions performed so far */
Can we sort data members by descending size? This will allow for more
efficient packing in memory.
Apart from this, LGTM. +1 with the suggested change.
On Sat, Jul 9, 2016 at 2:37 PM, Amos Jeffries <[email protected]> wrote:
> This patch converts the CacheDigest members and method parameters to use
> explicitly sized data types more appropriate for what details they hold.
>
> * 64-bit Digest capacity (entry count)
> * 32-bit Mask Size (byte count)
> * 8-bit Bit count per entry
>
> Due to various store_digest.cc code still relying on masks not exceeding
> 2^31-1 worth of memory space we have to still assert that bitCount
> calculation does not exceed that value.
>
> Amos
>
>
> _______________________________________________
> squid-dev mailing list
> [email protected]
> http://lists.squid-cache.org/listinfo/squid-dev
>
>
--
Francesco
_______________________________________________
squid-dev mailing list
[email protected]
http://lists.squid-cache.org/listinfo/squid-dev