Skip to content

Commit

Permalink
Fix build failure in Meta internal test (facebookincubator#9556)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: facebookincubator#9556

Reviewed By: amitkdutta, ggezer

Differential Revision: D56395158

Pulled By: xiaoxmeng

fbshipit-source-id: b9b56f6f8bf819916723970289192d121f9a9b90
  • Loading branch information
xiaoxmeng authored and facebook-github-bot committed Apr 21, 2024
1 parent 53f6bf7 commit d44a23e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions velox/common/memory/SharedArbitrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,13 @@ uint64_t SharedArbitrator::decrementFreeCapacity(
uint64_t SharedArbitrator::decrementFreeCapacityLocked(
uint64_t maxBytes,
uint64_t minBytes) {
uint64_t allocatedBytes = std::min(freeNonReservedCapacity_, maxBytes);
uint64_t allocatedBytes =
std::min<uint64_t>(freeNonReservedCapacity_, maxBytes);
VELOX_CHECK_LE(allocatedBytes, freeNonReservedCapacity_);
freeNonReservedCapacity_ -= allocatedBytes;
if (allocatedBytes < minBytes) {
const uint64_t reservedBytes =
std::min(minBytes - allocatedBytes, freeReservedCapacity_);
std::min<uint64_t>(minBytes - allocatedBytes, freeReservedCapacity_);
VELOX_CHECK_LE(reservedBytes, freeReservedCapacity_);
freeReservedCapacity_ -= reservedBytes;
allocatedBytes += reservedBytes;
Expand Down

0 comments on commit d44a23e

Please sign in to comment.