@@ -54,11 +54,11 @@ CacheAllocator<CacheTrait>::CacheAllocator(
5454 : config.memMonitoringEnabled ()},
5555 config_ (config.validate()),
5656 tempShm_ (type == InitMemType::kNone && isOnShm_
57- ? std::make_unique<TempShmMapping>(config_.size )
57+ ? std::make_unique<TempShmMapping>(config_.getCacheSize() )
5858 : nullptr ),
5959 shmManager_ (type != InitMemType::kNone
6060 ? std::make_unique<ShmManager>(config_.cacheDir,
61- config_.usePosixShm )
61+ config_.isUsingPosixShm() )
6262 : nullptr ),
6363 deserializer_ (type == InitMemType::kMemAttach ? createDeserializer()
6464 : nullptr ),
@@ -122,10 +122,10 @@ CacheAllocator<CacheTrait>::createNewMemoryAllocator() {
122122 return std::make_unique<MemoryAllocator>(
123123 getAllocatorConfig (config_),
124124 shmManager_
125- ->createShm (detail::kShmCacheName , config_.size ,
125+ ->createShm (detail::kShmCacheName , config_.getCacheSize () ,
126126 config_.slabMemoryBaseAddr , createShmCacheOpts ())
127127 .addr ,
128- config_.size );
128+ config_.getCacheSize () );
129129}
130130
131131template <typename CacheTrait>
@@ -135,9 +135,8 @@ CacheAllocator<CacheTrait>::restoreMemoryAllocator() {
135135 deserializer_->deserialize <MemoryAllocator::SerializationType>(),
136136 shmManager_
137137 ->attachShm (detail::kShmCacheName , config_.slabMemoryBaseAddr ,
138- createShmCacheOpts ())
139- .addr ,
140- config_.size ,
138+ createShmCacheOpts ()).addr ,
139+ config_.getCacheSize (),
141140 config_.disableFullCoredump );
142141}
143142
@@ -243,10 +242,10 @@ std::unique_ptr<MemoryAllocator> CacheAllocator<CacheTrait>::initAllocator(
243242 if (type == InitMemType::kNone ) {
244243 if (isOnShm_ == true ) {
245244 return std::make_unique<MemoryAllocator>(
246- getAllocatorConfig (config_), tempShm_->getAddr (), config_.size );
245+ getAllocatorConfig (config_), tempShm_->getAddr (), config_.getCacheSize () );
247246 } else {
248247 return std::make_unique<MemoryAllocator>(getAllocatorConfig (config_),
249- config_.size );
248+ config_.getCacheSize () );
250249 }
251250 } else if (type == InitMemType::kMemNew ) {
252251 return createNewMemoryAllocator ();
@@ -2251,7 +2250,7 @@ PoolEvictionAgeStats CacheAllocator<CacheTrait>::getPoolEvictionAgeStats(
22512250template <typename CacheTrait>
22522251CacheMetadata CacheAllocator<CacheTrait>::getCacheMetadata() const noexcept {
22532252 return CacheMetadata{kCachelibVersion , kCacheRamFormatVersion ,
2254- kCacheNvmFormatVersion , config_.size };
2253+ kCacheNvmFormatVersion , config_.getCacheSize () };
22552254}
22562255
22572256template <typename CacheTrait>
0 commit comments