r2394 - in trunk/varnish-cache: . bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Tue Jan 29 09:45:40 CET 2008


Author: phk
Date: 2008-01-29 09:45:40 +0100 (Tue, 29 Jan 2008)
New Revision: 2394

Modified:
   trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c
   trunk/varnish-cache/configure.ac
Log:
Use getdtablesize() to size bitmap if we have it.


Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c	2008-01-29 08:14:49 UTC (rev 2393)
+++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c	2008-01-29 08:45:40 UTC (rev 2394)
@@ -86,8 +86,13 @@
 
 	vb = calloc(sizeof *vb, 1);
 	AN(vb);
-	if (initial == 0)
+	if (initial == 0) {
+#ifdef HAVE_GETDTABLESIZE
+		initial = getdtablesize();
+#else
 		initial = VBITMAP_LUMP;
+#endif
+	}
 	vbit_expand(vb, initial);
 	return (vb);
 }

Modified: trunk/varnish-cache/configure.ac
===================================================================
--- trunk/varnish-cache/configure.ac	2008-01-29 08:14:49 UTC (rev 2393)
+++ trunk/varnish-cache/configure.ac	2008-01-29 08:45:40 UTC (rev 2394)
@@ -101,6 +101,7 @@
 AC_CHECK_FUNCS([socket])
 AC_CHECK_FUNCS([strptime])
 AC_CHECK_FUNCS([fmtcheck])
+AC_CHECK_FUNCS([getdtablesize])
 
 # Don't look for sendfile at all, none of them work
 # anyway. (don't tell when done with passed mem-range)




More information about the varnish-commit mailing list