2014年4月14日

Redis源码笔记六: ziplist(进度四分之三)

摘要: 1 /* 2 * Copyright (c) 2009-2012, Pieter Noordhuis 3 * Copyright (c) 2009-2012, Salvatore Sanfilippo 4 * All rights reserved. 5 * 6 * Redistri... 阅读全文

posted @ 2014-04-14 22:23 __夏沫 阅读(443) 评论(0) 推荐(0)

2014年4月12日

Redis源码笔记五: intset

摘要: 1 /* 2 * Copyright (c) 2009-2012, Pieter Noordhuis 3 * Copyright (c) 2009-2012, Salvatore Sanfilippo 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are met: 8 * 9 * ... 阅读全文

posted @ 2014-04-12 00:07 __夏沫 阅读(453) 评论(0) 推荐(0)

2014年4月11日

Redis源码笔记四: skiplist

摘要: 1 /* ZSETs use a specialized version of Skiplists */ 2 typedef struct zskiplistNode { 3 4 /* member对象 */ 5 robj *obj; 6 7 /* 分值 */ 8 double score; 9 10 /* 后退指针 */11 struct zskiplistNode *backward;12 13 /* 层 */14 struct zskiplistLevel {15 /* 前进指针 */16 ... 阅读全文

posted @ 2014-04-11 11:25 __夏沫 阅读(591) 评论(0) 推荐(0)

2014年4月1日

Redis源码笔记三: dict

摘要: 1 /* Hash Tables Implementation. 2 * 3 * This file implements in-memory hash tables with insert/del/replace/find/ 4 * get-random-element operations. Hash tables will auto-resize if needed 5 * tables of power of two in size are used, collisions are handled by 6 * chaining. See the source ... 阅读全文

posted @ 2014-04-01 23:46 __夏沫 阅读(293) 评论(0) 推荐(0)

2014年3月31日

Redis源码笔记一: sds

摘要: 1 /* SDSLib, A C dynamic strings library 2 * 3 * Copyright (c) 2006-2010, Salvatore Sanfilippo 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are met: 8 * 9 ... 阅读全文

posted @ 2014-03-31 20:18 __夏沫 阅读(493) 评论(0) 推荐(0)

Redis源码笔记二: adlist

摘要: 1 /* adlist.h - A generic doubly linked list implementation 2 * 3 * Copyright (c) 2006-2012, Salvatore Sanfilippo 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions ... 阅读全文

posted @ 2014-03-31 19:47 __夏沫 阅读(332) 评论(0) 推荐(0)

计划写Redis的源码分析笔记

摘要: 每天抽出时间来读一读代码,只是作为学习的目的。若有写的不正确的,欢迎指出错误,谢谢!redis的版本选的2.6.12。形式以源码剖析的方式写,类似于结合代码写注释。 阅读全文

posted @ 2014-03-31 15:42 __夏沫 阅读(131) 评论(0) 推荐(0)

导航