摘要:
Redis源码系列——双链表 redis底层的数据结构使用了双链表,其实现很简洁,值得阅读。 原型 src/adlist.h /*list node*/ typedef struct listNode{ struct listNode *prev; struct listNode *next; /* 阅读全文
摘要:
Redis源码系列——内存管理 函数原型 src/zmalloc.h 函数指针与void*指针的使用,提供了一个泛型的机制 /*stringfication*/ #define __xstr(s) __str(s) #define __str(s) #s /*prototypes*/ void *z 阅读全文