27 #ifndef Hypertable_RangeServer_MemoryTracker_h
28 #define Hypertable_RangeServer_MemoryTracker_h
53 void add(int64_t amount) {
54 std::lock_guard<std::mutex> lock(
m_mutex);
61 std::lock_guard<std::mutex> lock(
m_mutex);
71 std::lock_guard<std::mutex> lock(
m_mutex);
95 #endif // Hypertable_RangeServer_MemoryTracker_h
FileBlockCache * m_block_cache
Pointer to block cache.
MemoryTracker(FileBlockCache *block_cache, QueryCachePtr query_cache)
Constructor.
int64_t m_memory_used
Current range server memory used.
Tracks range server memory used.
QueryCachePtr m_query_cache
Pointer to query cache.
std::mutex m_mutex
Mutex to serialize concurrent access
std::shared_ptr< QueryCache > QueryCachePtr
Smart pointer to QueryCache.
void subtract(int64_t amount)
Subtract to memory used.
void add(int64_t amount)
Add to memory used.
int64_t balance()
Return total range server memory used.