Tag Archive: redis

字典结构 typedef struct dict{ dictType *type; void *privdata; dictht ht[2]; //哈希表 使用ht[0],ht[1]用于rehash int rehashidx; //当rehash不在进行时,值为-1;记录rehash进度 }dict; hash值计算公式: hash = dict->type->hashFunction(key);
SDS simple dynamic string redis 默认字符串 结构: struct sdshdr{ int len; int free; char buf[]; }; 打印 printf("%s",s->buf);
Powered by Typecho. Theme: Motion modified by changyuefeng.版权所有ICP证:浙ICP备20011766号