2020年7月24日
摘要: 字典, 又称符号表(symbol table)、关联数组(associative array)或者映射(map), 是一种用于保存键值对(key-value pair)的抽象数据结构。 字典在 Redis 中的应用相当广泛, 比如 Redis 的数据库就是使用字典来作为底层实现的, 对数据库的增、删 阅读全文
posted @ 2020-07-24 17:30 围龙小子 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 1、每个链表节点使用一个adlist.h/listNode结构来表示:typedef struct listNode { // 前置节点 struct listNode *prev; // 后置节点 struct listNode *next; // 节点的值 void *value; } list 阅读全文
posted @ 2020-07-24 17:05 围龙小子 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 参考:http://redisbook.com/preview/sds/different_between_sds_and_c_string.html Redis 只会使用 C 字符串作为字面量, 在大多数情况下, Redis 使用 SDS (Simple Dynamic String,简单动态字符 阅读全文
posted @ 2020-07-24 16:39 围龙小子 阅读(133) 评论(0) 推荐(0) 编辑