[Mono-list] More fighting with Hashtable

Miguel de Icaza miguel@ximian.com
13 Jul 2001 14:39:07 -0400


> I've got it currently implemented as
> 
> 
> 	  int newCapacity = oldCapacity * 2 + 1;
> 
> ...which works, but I'd rather be specworthy.  Can anybody point me at some
> math for determining the next prime number greater than a given integer?

You might want to look at the implementation of the GHashTable in
Glib.  It implements some of the same tricks for C.

Here is the url: http://cvs.gnome.org/lxr/source/glib/ghash.c

Miguel.