<div dir="ltr">thank you very much<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-12 10:19 GMT-05:00 Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<div><div class="h5"><br>
On Thu, Jan 08, 2015 at 12:34:39PM -0500, Ian Labbé wrote:<br>
<br>
> Hello,<br>
><br>
> Maybe i am not in the right mailing list, please refer me to the good one<br>
> if i am at the wrong one.<br>
><br>
> I just want to understand the " for (size = start; size <= hinit->max_size;<br>
> size++) " loop in the ngx_hash_init function.<br>
> I do not understand what "size", "key" and "test[key]" mean in first place.<br>
<br>
</div></div>The ngx_hash_init() functions tries to build a hash by using a<br>
varying number of buckets. The "size" variable corresponds to the<br>
number of buckets we test at the current loop iteration. For each<br>
size we iterate over all hash items to check how buckets will be<br>
("key" is a bucket number for a given hash item, "test[key]"<br>
stores how many bytes will be stored in the bucket).<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Maxim Dounin<br>
<a href="http://nginx.org/" target="_blank">http://nginx.org/</a><br>
<br>
_______________________________________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a></font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Ian Labbé<br>Chemin des Quatre-Bourgeois<br>418-529-0210<br>G1W 2L1<br><br></div>
</div>