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

hongze pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 5897d3419 [VL] Minor: No need toobtain old shrunk memory (#6847)
5897d3419 is described below

commit 5897d3419036f3383cf1a1d2ce363e8cfbbe0738
Author: Rex(Hui) An <[email protected]>
AuthorDate: Thu Aug 15 08:43:29 2024 +0800

    [VL] Minor: No need toobtain old shrunk memory (#6847)
---
 cpp/velox/memory/VeloxMemoryManager.cc | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/cpp/velox/memory/VeloxMemoryManager.cc 
b/cpp/velox/memory/VeloxMemoryManager.cc
index 5b2ba258a..0a57d6a99 100644
--- a/cpp/velox/memory/VeloxMemoryManager.cc
+++ b/cpp/velox/memory/VeloxMemoryManager.cc
@@ -252,10 +252,7 @@ int64_t 
shrinkVeloxMemoryPool(velox::memory::MemoryManager* mm, velox::memory::M
   VLOG(2) << logPrefix << "Pool has reserved " << pool->usedBytes() << "/" << 
pool->root()->reservedBytes() << "/"
           << pool->root()->capacity() << "/" << pool->root()->maxCapacity() << 
" bytes.";
   VLOG(2) << logPrefix << "Shrinking...";
-  const uint64_t oldCapacity = pool->capacity();
-  mm->arbitrator()->shrinkCapacity(pool, 0);
-  const uint64_t newCapacity = pool->capacity();
-  int64_t shrunken = oldCapacity - newCapacity;
+  auto shrunken = mm->arbitrator()->shrinkCapacity(pool, 0);
   VLOG(2) << logPrefix << shrunken << " bytes released from shrinking.";
   return shrunken;
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to