diff options
Diffstat (limited to 'src/dict.c')
-rw-r--r-- | src/dict.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/dict.c b/src/dict.c index 39af94707..4760a5d26 100644 --- a/src/dict.c +++ b/src/dict.c @@ -237,7 +237,9 @@ long long timeInMilliseconds(void) { return (((long long)tv.tv_sec)*1000)+(tv.tv_usec/1000); } -/* Rehash for an amount of time between ms milliseconds and ms+1 milliseconds */ +/* Rehash in ms+"delta" milliseconds. The value of "delta" is larger + * than 0, and is smaller than 1 in most cases. The exact upper bound + * depends on the running time of dictRehash(d,100).*/ int dictRehashMilliseconds(dict *d, int ms) { if (d->iterators > 0) return 0; @@ -749,7 +751,7 @@ unsigned int dictGetSomeKeys(dict *d, dictEntry **des, unsigned int count) { * this function instead what we do is to consider a "linear" range of the table * that may be constituted of N buckets with chains of different lengths * appearing one after the other. Then we report a random element in the range. - * In this way we smooth away the problem of different chain lenghts. */ + * In this way we smooth away the problem of different chain lengths. */ #define GETFAIR_NUM_ENTRIES 15 dictEntry *dictGetFairRandomKey(dict *d) { dictEntry *entries[GETFAIR_NUM_ENTRIES]; @@ -1119,7 +1121,7 @@ size_t _dictGetStatsHt(char *buf, size_t bufsize, dictht *ht, int tableid) { i, clvector[i], ((float)clvector[i]/ht->size)*100); } - /* Unlike snprintf(), teturn the number of characters actually written. */ + /* Unlike snprintf(), return the number of characters actually written. */ if (bufsize) buf[bufsize-1] = '\0'; return strlen(buf); } |