The first time I encountered the memory fragmentation problem common in hashtables wasn't even in a hashtable implementation, it was in a program that used realloc heavily, and doubled the buffer size every time.
This was causing massive problems trying to concurrently read a stream over the network and start parsing it, because the realloc had trouble finding appropriately sized fragments. Once I pointed it out to the lead dev he used a different strategy and cut the load time on a multi-megabyte file by a factor of ten.
Much later on I would learn that he could have also solved the problem just by adjusting the growth factor to 1.5 instead of 2x.
This was causing massive problems trying to concurrently read a stream over the network and start parsing it, because the realloc had trouble finding appropriately sized fragments. Once I pointed it out to the lead dev he used a different strategy and cut the load time on a multi-megabyte file by a factor of ten.
Much later on I would learn that he could have also solved the problem just by adjusting the growth factor to 1.5 instead of 2x.