@@ -214,12 +214,12 @@ SH_COMPUTE_PARAMETERS(SH_TYPE * tb, uint32 newsize)
214
214
/* supporting zero sized hashes would complicate matters */
215
215
size = Max (newsize , 2 );
216
216
217
- /* round up size to the next power of 2, that's the bucketing works */
217
+ /* round up size to the next power of 2, that's how bucketing works */
218
218
size = sh_pow2 (size );
219
219
Assert (size <= SH_MAX_SIZE );
220
220
221
221
/*
222
- * Verify allocation of ->data is possible on platform, without
222
+ * Verify that allocation of ->data is possible on this platform, without
223
223
* overflowing Size.
224
224
*/
225
225
if ((((uint64 ) sizeof (SH_ELEMENT_TYPE )) * size ) >= MaxAllocHugeSize )
@@ -234,8 +234,8 @@ SH_COMPUTE_PARAMETERS(SH_TYPE * tb, uint32 newsize)
234
234
tb -> sizemask = tb -> size - 1 ;
235
235
236
236
/*
237
- * Compute growth threshold here and after growing the table, to make
238
- * computations during insert cheaper .
237
+ * Compute the next threshold at which we need to grow the hash table
238
+ * again .
239
239
*/
240
240
if (tb -> size == SH_MAX_SIZE )
241
241
tb -> grow_threshold = ((double ) tb -> size ) * SH_MAX_FILLFACTOR ;
@@ -696,7 +696,7 @@ SH_DELETE(SH_TYPE * tb, SH_KEY_TYPE key)
696
696
* or an element at its optimal position is encountered.
697
697
*
698
698
* While that sounds expensive, the average chain length is short,
699
- * and deletions would otherwise require toombstones .
699
+ * and deletions would otherwise require tombstones .
700
700
*/
701
701
while (true)
702
702
{
0 commit comments