Skip to content

Commit

Permalink
Merge pull request OpenAtomFoundation#326 from chejinge/fix_mem_leak
Browse files Browse the repository at this point in the history
bugfix: delete redundant class members/funcs fix memory leak
  • Loading branch information
AlexStocks authored Nov 27, 2023
2 parents c38a740 + c1fcb13 commit 853ba64
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
6 changes: 0 additions & 6 deletions include/pika_slot.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,12 @@ class Slot : public std::enable_shared_from_this<Slot>,public pstd::noncopyable
pstd::Status GetKeyNum(std::vector<storage::KeyInfo>* key_info);
KeyScanInfo GetKeyScanInfo();

/*
* SlotsMgrt used
*/
void GetSlotsMgrtSenderStatus(std::string *ip, int64_t *port, int64_t *slot, bool *migrating, int64_t *moved, int64_t *remained);
/*
* Cache used
*/
DisplayCacheInfo GetCacheInfo();
void UpdateCacheInfo(CacheInfo& cache_info);
void ResetDisplayCacheInfo(int status);
uint64_t GetCacheUsage() {return cache_usage_;}
uint64_t cache_usage_;

private:
Expand Down Expand Up @@ -181,7 +176,6 @@ class Slot : public std::enable_shared_from_this<Slot>,public pstd::noncopyable
/*
* Cache used
*/
pstd::Mutex cache_info_protector_;
DisplayCacheInfo cache_info_;
std::shared_mutex cache_info_rwlock_;
};
Expand Down
1 change: 0 additions & 1 deletion src/pika_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1464,7 +1464,6 @@ Status PikaCache::InitWithoutLock(uint32_t cache_num, cache::CacheConfig *cache_
cache_mutexs_.push_back(std::make_shared<pstd::Mutex>());
}
cache_status_ = PIKA_CACHE_STATUS_OK;

return Status::OK();
}

Expand Down

0 comments on commit 853ba64

Please sign in to comment.