ngx_hash_init

Ian Labbé ian.labbe at gmail.com
Mon Jan 19 14:38:53 UTC 2015


thank you very much

2015-01-12 10:19 GMT-05:00 Maxim Dounin <mdounin at mdounin.ru>:

> Hello!
>
> On Thu, Jan 08, 2015 at 12:34:39PM -0500, Ian Labbé wrote:
>
> > Hello,
> >
> > Maybe i am not in the right mailing list, please refer me to the good one
> > if i am at the wrong one.
> >
> > I just want to understand the " for (size = start; size <=
> hinit->max_size;
> > size++) " loop in the ngx_hash_init function.
> > I do not understand what "size", "key" and "test[key]" mean in first
> place.
>
> The ngx_hash_init() functions tries to build a hash by using a
> varying number of buckets.  The "size" variable corresponds to the
> number of buckets we test at the current loop iteration.  For each
> size we iterate over all hash items to check how buckets will be
> ("key" is a bucket number for a given hash item, "test[key]"
> stores how many bytes will be stored in the bucket).
>
> --
> Maxim Dounin
> http://nginx.org/
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel




-- 
Ian Labbé
Chemin des Quatre-Bourgeois
418-529-0210
G1W 2L1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20150119/f025047c/attachment.html>


More information about the nginx-devel mailing list