feat(server): Tracking memory usage for client tracking table (#2431)

Tracking memory usage for client tracking table using C++ memory resource and polymorphic allocator.
This commit is contained in:
Yue Li 2024-01-17 13:20:23 -08:00 committed by GitHub
parent e06b736c02
commit d1db48d9d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 3 deletions

View file

@ -249,7 +249,10 @@ SliceEvents& SliceEvents::operator+=(const SliceEvents& o) {
#undef ADD
DbSlice::DbSlice(uint32_t index, bool caching_mode, EngineShard* owner)
: shard_id_(index), caching_mode_(caching_mode), owner_(owner) {
: shard_id_(index),
caching_mode_(caching_mode),
owner_(owner),
client_tracking_map_(owner->memory_resource()) {
db_arr_.emplace_back();
CreateDb(0);
expire_base_[0] = expire_base_[1] = 0;