# define bendl std::endl; }
#endif
- atomic_t buffer_total_alloc;
- bool buffer_track_alloc = get_env_bool("CEPH_BUFFER_TRACK");
+ static atomic_t buffer_total_alloc;
+ const bool buffer_track_alloc = get_env_bool("CEPH_BUFFER_TRACK");
void buffer::inc_total_alloc(unsigned len) {
if (buffer_track_alloc)
return buffer_total_alloc.read();
}
- atomic_t buffer_cached_crc;
- atomic_t buffer_cached_crc_adjusted;
- bool buffer_track_crc = get_env_bool("CEPH_BUFFER_TRACK");
+ static atomic_t buffer_cached_crc;
+ static atomic_t buffer_cached_crc_adjusted;
+ static bool buffer_track_crc = get_env_bool("CEPH_BUFFER_TRACK");
void buffer::track_cached_crc(bool b) {
buffer_track_crc = b;
return buffer_cached_crc_adjusted.read();
}
- atomic_t buffer_c_str_accesses;
- bool buffer_track_c_str = get_env_bool("CEPH_BUFFER_TRACK");
+ static atomic_t buffer_c_str_accesses;
+ static bool buffer_track_c_str = get_env_bool("CEPH_BUFFER_TRACK");
void buffer::track_c_str(bool b) {
buffer_track_c_str = b;
return buffer_c_str_accesses.read();
}
- atomic_t buffer_max_pipe_size;
+ static atomic_t buffer_max_pipe_size;
int update_max_pipe_size() {
#ifdef CEPH_HAVE_SETPIPE_SZ
char buf[32];