自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(2)
  • 收藏
  • 关注

原创 Redis采用的Hash算法

在Redis中,采用Bernstein的Hash算法,具体代码如下:unsigned int dictGenHashFunction(const unsigned char *buf, int len) { unsigned int hash = 5381; while (len--) hash = ((hash << 5) + hash) + (*buf

2012-01-12 08:12:26 1915

原创 Redis代码分析之核心数据结构

在Redis中核心的数据结构有以下一些:1)dict数据结构:typedef struct dict { dictType *type; void *privdata; dictht ht[2]; int rehashidx; int iterators;} dict;其中:

2012-01-10 17:55:06 743

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除