@@ -253,39 +253,39 @@ class MultiSizeBufferPool {
253253 // Subpool level:
254254 // numAllocatedBytes_ + numNonAllocatedBytes_ = SubpoolConfig::numMaxBuffers * (SubpoolConfig::bufferSize +
255255 // chunkMetadataSize())
256- std::atomic_uint64_t numAllocatedBytes_{};
257- std::atomic_uint64_t numNonAllocatedBytes_{};
256+ std::atomic_int64_t numAllocatedBytes_{};
257+ std::atomic_int64_t numNonAllocatedBytes_{};
258258
259259 // numAllocatedBytes_ = numUnusedBytes_ + numUsedBytes_
260- std::atomic_uint64_t numUsedBytes_{};
261- std::atomic_uint64_t numUnusedBytes_{};
260+ std::atomic_int64_t numUsedBytes_{};
261+ std::atomic_int64_t numUnusedBytes_{};
262262
263263 // numAllocatedChunks_ + numNonAllocatedChunks_ = SubpoolConfig::numMaxBuffers
264- std::atomic_uint64_t numAllocatedChunks_{};
265- std::atomic_uint64_t numNonAllocatedChunks_{};
264+ std::atomic_int64_t numAllocatedChunks_{};
265+ std::atomic_int64_t numNonAllocatedChunks_{};
266266
267267 // numAllocatedChunks_ = numUsedChunks_ + numUnusedChunks_
268- std::atomic_uint64_t numUsedChunks_{};
269- std::atomic_uint64_t numUnusedChunks_{};
268+ std::atomic_int64_t numUsedChunks_{};
269+ std::atomic_int64_t numUnusedChunks_{};
270270 } current_;
271271
272272 // Overall statistics are accumulating
273273 struct OverallStatistics {
274- std::atomic_uint64_t numAllocatedBytes_{};
275- std::atomic_uint64_t numDeletedBytes_{};
276- std::atomic_uint64_t numUsedBytes_{};
274+ std::atomic_int64_t numAllocatedBytes_{};
275+ std::atomic_int64_t numDeletedBytes_{};
276+ std::atomic_int64_t numUsedBytes_{};
277277
278- std::atomic_uint64_t numAllocatedChunks_{};
279- std::atomic_uint64_t numDeletedChunks_{};
280- std::atomic_uint64_t numUsedChunks_{};
278+ std::atomic_int64_t numAllocatedChunks_{};
279+ std::atomic_int64_t numDeletedChunks_{};
280+ std::atomic_int64_t numUsedChunks_{};
281281
282282 // Amount of times where a chunk did not fit into the needed buffer size and returned to pool without use
283- std::atomic_uint64_t numBufferUsageFailed_{};
283+ std::atomic_int64_t numBufferUsageFailed_{};
284284 // Amount of times where a chunk fit into the needed buffer size and returned to pool without use
285- std::atomic_uint64_t numBufferUsageSuccess_{};
285+ std::atomic_int64_t numBufferUsageSuccess_{};
286286
287- std::atomic_uint64_t maxNumAllocatedBytes_{};
288- std::atomic_uint64_t maxNumAllocatedChunks_{};
287+ std::atomic_int64_t maxNumAllocatedBytes_{};
288+ std::atomic_int64_t maxNumAllocatedChunks_{};
289289 } overall_;
290290
291291 // relevant only if reportOnChangesOnly_ is true. Used to mark if the content need to be reported, only if there was
@@ -337,7 +337,7 @@ class MultiSizeBufferPool {
337337
338338 std::atomic_bool stopFlag_;
339339 std::atomic_bool purgeFlag_;
340- std::atomic_uint64_t purgeLimit_;
340+ std::atomic_int64_t purgeLimit_;
341341 const logging::Logger& logger_;
342342 std::string name_;
343343 const uint32_t chunkSize_;
0 commit comments