1 Star 0 Fork 1

yyqng / memcached-memcached-master

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
globals.c 910 Bytes
一键复制 编辑 原始数据 按行查看 历史
dormando 提交于 2016-06-27 16:26 . clean up global stats code a little.
#include "memcached.h"
/*
* This file contains global variables shared across the rest of the
* memcached codebase. These were originally in memcached.c but had
* to be removed to make the rest of the object files linkable into
* the test infrastructure.
*
*/
/*
* We keep the current time of day in a global variable that's updated by a
* timer event. This saves us a bunch of time() system calls (we really only
* need to get the time once a second, whereas there can be tens of thousands
* of requests a second) and allows us to use server-start-relative timestamps
* rather than absolute UNIX timestamps, a space savings on systems where
* sizeof(time_t) > sizeof(unsigned int).
*/
volatile rel_time_t current_time;
/** exported globals **/
struct stats stats;
struct stats_state stats_state;
struct settings settings;
struct slab_rebalance slab_rebal;
volatile int slab_rebalance_signal;
1
https://gitee.com/yyqng/memcached-memcached-master.git
git@gitee.com:yyqng/memcached-memcached-master.git
yyqng
memcached-memcached-master
memcached-memcached-master
master

搜索帮助