diff options
author | oranagra <oran@redislabs.com> | 2016-12-30 03:37:52 +0200 |
---|---|---|
committer | oranagra <oran@redislabs.com> | 2016-12-30 03:37:52 +0200 |
commit | 7aa9e6d2ae1d500d8ba900b239207143993ecc3e (patch) | |
tree | ed9d684b562250c09d9570c109f0630554b5af6c /src/dict.h | |
parent | 6712bce92c79de5c2caa38e9b597a3fa52fd497f (diff) | |
download | redis-7aa9e6d2ae1d500d8ba900b239207143993ecc3e.tar.gz |
active memory defragmentation
Diffstat (limited to 'src/dict.h')
-rw-r--r-- | src/dict.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dict.h b/src/dict.h index 04b247a25..fcb68d998 100644 --- a/src/dict.h +++ b/src/dict.h @@ -95,6 +95,7 @@ typedef struct dictIterator { } dictIterator; typedef void (dictScanFunction)(void *privdata, const dictEntry *de); +typedef void (dictScanBucketFunction)(void *privdata, dictEntry **bucketref); /* This is the initial size of every hash table */ #define DICT_HT_INITIAL_SIZE 4 @@ -176,7 +177,9 @@ int dictRehash(dict *d, int n); int dictRehashMilliseconds(dict *d, int ms); void dictSetHashFunctionSeed(unsigned int initval); unsigned int dictGetHashFunctionSeed(void); -unsigned long dictScan(dict *d, unsigned long v, dictScanFunction *fn, void *privdata); +unsigned long dictScan(dict *d, unsigned long v, dictScanFunction *fn, dictScanBucketFunction *bucketfn, void *privdata); +unsigned int dictGetHash(dict *d, const void *key); +dictEntry *dictReplaceKeyPtr(dict *d, const void *oldptr, void *newptr, unsigned int hash); /* Hash table types */ extern dictType dictTypeHeapStringCopyKey; |