摘要: structkfifo{unsignedchar*buffer;/*thebufferholdingthedata*/unsignedintsize;/*thesizeoftheallocatedbuffer*/unsignedintin;/*dataisaddedatoffset(in%size)... 阅读全文
posted @ 2014-07-08 15:06 HAPPY_PM 阅读(1543) 评论(0) 推荐(0) 编辑
摘要: 如#define ALIGNMENT 4size=(size+ALIGNMENT-1)&~(ALIGNMENT-1)如size=11 则新的size为12 阅读全文
posted @ 2014-07-08 13:57 HAPPY_PM 阅读(296) 评论(0) 推荐(0) 编辑
摘要: B-树1 .B-树定义B-树是一种平衡的多路查找树,它在文件系统中很有用。定义:一棵m 阶的B-树,或者为空树,或为满足下列特性的m 叉树:⑴树中每个结点至多有m 棵子树;⑵若根结点不是叶子结点,则至少有两棵子树;⑶除根结点之外的所有非终端结点至少有[m/2] 棵子树;⑷所有的非终端结点中包含以下信... 阅读全文
posted @ 2014-07-08 13:29 HAPPY_PM 阅读(201) 评论(0) 推荐(0) 编辑