Skip to content

Commit

Permalink
[VL] Minor: No need toobtain old shrunk memory (apache#6847)
Browse files Browse the repository at this point in the history
  • Loading branch information
boneanxs authored and shamirchen committed Oct 14, 2024
1 parent eb1f394 commit e1fdae5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cpp/velox/memory/VeloxMemoryManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e1fdae5

Please sign in to comment.