摘要: http://redis.io/topics/internals-vmVirtual Memory technical specificationThis document details the internals of the Redis Virtual Memory subsystem. The intended audience is not the final user but programmers willing to understand or modify the Virtual Memory implementation.Keys vs Values: what is sw 阅读全文
posted @ 2014-01-04 22:49 一天不进步,就是退步 阅读(1178) 评论(0) 推荐(0) 编辑
摘要: 1. Redis内存管理通过在zmalloc.h和zmalloc.c中重写c语言对内存的管理来完成的。 redis内存管理c内存管理原型作用zmallocmallocvoid *malloc(unsigned int num_bytes);分配一块指定大小的内存区域,并返回指向该区域头部的指针,分配失败则返回NULLzcalloccallocvoid *calloc(unsigned n, unsigned size);在内存的动态存储区中分配n个长度为size的连续空间,函数返回一个指向分配起始地址的指针;如果分配不成功,返回NULL。zreallocreallocoid *reall... 阅读全文
posted @ 2014-01-04 22:29 一天不进步,就是退步 阅读(7582) 评论(0) 推荐(0) 编辑