Use primes for hashtable size
borodin at octonica.com
Tue May 30 10:28:03 UTC 2017
We often use hashtable sizes equal to the power of 2. This can be
damaging for a hashtable. I haven't found any mitigation for this in
nginx code. So I made my own. If this issue is addressed somewhere
just ignore my message. Or I'd be happy if someone will point me it.
For the explanation of problem see
Code is checked for correctness of ngx_hash_min_prime(), I haven't
done any regression testing, sorry.
Also beware that I've changed state of paremeter hinit. I'm not sure
this is acceptable.
Thank you for your attention.
Best regards, Andrey Borodin, Octonica.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5777 bytes
Desc: not available
More information about the nginx-devel