--- lib/multi.c.orig	2007-04-29 20:50:18.000000000 +0300
+++ lib/multi.c	2007-04-29 21:01:03.000000000 +0300
@@ -50,6 +50,15 @@
 /* The last #include file should be: */
 #include "memdebug.h"
 
+/*
+  CURL_SOCKET_HASH_TABLE_SIZE should be a prime number. Increasing it from 
+  97 to 911 takes on a 32-bit machine 4 x 804 = 3211 more bytes. 
+  Still, every CURL handle takes 45-50 K memory, therefore this 3K are not significant. 
+*/
+#ifndef CURL_SOCKET_HASH_TABLE_SIZE
+#define CURL_SOCKET_HASH_TABLE_SIZE 911
+#endif
+
 struct Curl_message {
   /* the 'CURLMsg' is the part that is visible to the external user */
   struct CURLMsg extmsg;
@@ -323,7 +332,7 @@
  */
 static struct curl_hash *sh_init(void)
 {
-  return Curl_hash_alloc(97, hash_fd, fd_key_compare, sh_freeentry);
+  return Curl_hash_alloc(CURL_SOCKET_HASH_TABLE_SIZE, hash_fd, fd_key_compare, sh_freeentry);
 }
 
 CURLM *curl_multi_init(void)
