redis命令定义
redisCommandTable
AOF
redis在执行完命令后通过接口feedAppendOnlyFile将对应的命令写入到缓存aof_buf中,
在epoll休眠前调用beforeSleep->flushAppendOnlyFile将缓存写入到AOF文件中,redis根据appendfsync配置的方式进行fsync文件同步。后台fsync通过aof_background_fsync将job任务写入到bio_jobs中,由REDIS_BIO_AOF_FSYNC类型的线程一步处理。
Allocator
Selecting a non-default memory allocator when building Redis is done by setting
the MALLOC
environment variable. Redis is compiled and linked against libc
malloc by default, with the exception of jemalloc being the default on Linux
systems. This default was picked because jemalloc has proven to have fewer
fragmentation problems than libc malloc.
To force compiling against libc malloc, use:
% make MALLOC=libc
To compile against jemalloc on Mac OS X systems, use:
% make MALLOC=jemalloc