摘要: slabclass是slabclass_t数组,索引有size决定。slabclass数组中slabclass_t的size按照1.25倍依次增大,当然这个是可配的,具体这个该搞成多少,我也没有做结合业务做过实验。slabclass_t中的size就是当前slab中每个块的大小,乘以perslab一... 阅读全文
posted @ 2014-11-10 23:45 stevinwang 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 数据结构介绍item是memcached中存储的最小单元。数据结构的话,我觉得这个代码一贴,一目了然了。typedef struct _stritem { struct _stritem *next; struct _stritem *prev; struct _stritem *... 阅读全文
posted @ 2014-11-10 17:17 stevinwang 阅读(318) 评论(0) 推荐(0) 编辑
摘要: Arrays of Length Zero这样说:Zero-length arrays are allowed in GNU C. They are very useful as the last element of a structure that is really a header for ... 阅读全文
posted @ 2014-11-10 17:03 stevinwang 阅读(253) 评论(0) 推荐(0) 编辑