This is an automated email from the ASF dual-hosted git repository.

brycemecum pushed a commit to branch exp/memory-pool-bench-threads
in repository https://gitbox.apache.org/repos/asf/arrow.git

commit 6b39883c408418fff59a14d821f281b84e1af3d2
Author: Bryce Mecum <[email protected]>
AuthorDate: Wed Mar 20 19:59:07 2024 -0800

    Comment out body of UpdateAllocatedBytes
---
 cpp/src/arrow/memory_pool.h | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/cpp/src/arrow/memory_pool.h b/cpp/src/arrow/memory_pool.h
index 712a828041..0ffa8a1fc0 100644
--- a/cpp/src/arrow/memory_pool.h
+++ b/cpp/src/arrow/memory_pool.h
@@ -48,24 +48,24 @@ class MemoryPoolStats {
   int64_t num_allocations() const { return num_allocs_.load(); }
 
   inline void UpdateAllocatedBytes(int64_t diff, bool is_free = false) {
-    auto allocated = bytes_allocated_.fetch_add(diff) + diff;
-    // "maximum" allocated memory is ill-defined in multi-threaded code,
-    // so don't try to be too rigorous here
-    if (diff > 0 && allocated > max_memory_) {
-      max_memory_ = allocated;
-    }
-
-    // Reallocations might just expand/contract the allocation in place or 
might
-    // copy to a new location. We can't really know, so we just represent the
-    // optimistic case.
-    if (diff > 0) {
-      total_allocated_bytes_ += diff;
-    }
-
-    // We count any reallocation as a allocation.
-    if (!is_free) {
-      num_allocs_ += 1;
-    }
+//    auto allocated = bytes_allocated_.fetch_add(diff) + diff;
+//    // "maximum" allocated memory is ill-defined in multi-threaded code,
+//    // so don't try to be too rigorous here
+//    if (diff > 0 && allocated > max_memory_) {
+//      max_memory_ = allocated;
+//    }
+//
+//    // Reallocations might just expand/contract the allocation in place or 
might
+//    // copy to a new location. We can't really know, so we just represent the
+//    // optimistic case.
+//    if (diff > 0) {
+//      total_allocated_bytes_ += diff;
+//    }
+//
+//    // We count any reallocation as a allocation.
+//    if (!is_free) {
+//      num_allocs_ += 1;
+//    }
   }
 
  protected:

Reply via email to