diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-06-26 21:09:28 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-06-26 21:09:28 +0000 |
commit | 62f0f5571da55de683688c8fca8f8acdcbd98bec (patch) | |
tree | d3d2cefc7107b17359c28bd1ca1ccdc8875439b4 /lib/hostip.c | |
parent | 7a360de49d0ecfef683c4459450718b5283115d6 (diff) | |
download | curl-62f0f5571da55de683688c8fca8f8acdcbd98bec.tar.gz |
Robert Iakobashvili re-arranged the internal hash code to work with a custom
hash function for different hashes, and also expanded the default size for
the socket hash table used in multi handles to greatly enhance speed when
very many connections are added and the socket API is used.
Diffstat (limited to 'lib/hostip.c')
-rw-r--r-- | lib/hostip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/hostip.c b/lib/hostip.c index 9fb157fd3..5a7da5016 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -131,7 +131,8 @@ static void freednsentry(void *freethis); void Curl_global_host_cache_init(void) { if (!host_cache_initialized) { - Curl_hash_init(&hostname_cache, 7, freednsentry); + Curl_hash_init(&hostname_cache, 7, Curl_hash_str, Curl_str_key_compare, + freednsentry); host_cache_initialized = 1; } } @@ -537,7 +538,7 @@ static void freednsentry(void *freethis) */ struct curl_hash *Curl_mk_dnscache(void) { - return Curl_hash_alloc(7, freednsentry); + return Curl_hash_alloc(7, Curl_hash_str, Curl_str_key_compare, freednsentry); } #ifdef CURLRES_ADDRINFO_COPY |