[PATCH xserver] dix: Bump MAXHASHSIZE for the resource db

Keith Packard keithp at keithp.com
Fri Sep 30 04:06:57 UTC 2016


Adam Jackson <ajax at redhat.com> writes:

>  #define INITBUCKETS 64
>  #define INITHASHSIZE 6
> -#define MAXHASHSIZE 11
> +#define MAXHASHSIZE 16
>  
>  typedef struct _Resource {
>      struct _Resource *next;
> @@ -683,6 +683,16 @@ HashResourceID(XID id, int numBits)
>              return ((int)(0x3FF & (id ^ (id>>10))));
>          case 11:
>              return ((int)(0x7FF & (id ^ (id>>11))));
> +        case 12:
> +            return ((int)(0xFFF & (id ^ (id>>12))));
> +        case 13:
> +            return ((int)(0x1FFF & (id ^ (id>>13))));
> +        case 14:
> +            return ((int)(0x3FFF & (id ^ (id>>14))));
> +        case 15:
> +            return ((int)(0x7FFF & (id ^ (id>>15))));
> +        case 16:
> +            return ((int)(0xFFFF & (id ^ (id>>16))));
>      }
>      if (numBits >= 11)
>          return ((int)(0x7FF & (id ^ (id>>11))));

The last two lines look very suspicious now...

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160929/8068a866/attachment.sig>


More information about the xorg-devel mailing list