Skip to content

Commit

Permalink
Revert "branch-3.0: [fix](memory) Process available memory to increas…
Browse files Browse the repository at this point in the history
…e the Jemalloc cache apache#45621 (apache#45666)"

This reverts commit bfa7ca5.
  • Loading branch information
xinyiZzz committed Jan 14, 2025
1 parent 8d15539 commit b9744cc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions be/src/runtime/memory/global_memory_arbitrator.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class GlobalMemoryArbitrator {
static inline int64_t sys_mem_available() {
return MemInfo::_s_sys_mem_available.load(std::memory_order_relaxed) -
refresh_interval_memory_growth.load(std::memory_order_relaxed) -
process_reserved_memory() + static_cast<int64_t>(MemInfo::allocator_cache_mem());
process_reserved_memory();
}

static inline std::string sys_mem_available_str() {
Expand All @@ -91,14 +91,12 @@ class GlobalMemoryArbitrator {
static inline std::string sys_mem_available_details_str() {
auto msg = fmt::format(
"sys available memory {}(= {}[proc/available] - {}[reserved] - "
"{}B[waiting_refresh] + {}[tc/jemalloc_cache])",
"{}B[waiting_refresh])",
PrettyPrinter::print(sys_mem_available(), TUnit::BYTES),
PrettyPrinter::print(MemInfo::_s_sys_mem_available.load(std::memory_order_relaxed),
TUnit::BYTES),
PrettyPrinter::print(process_reserved_memory(), TUnit::BYTES),
refresh_interval_memory_growth,
PrettyPrinter::print(static_cast<uint64_t>(MemInfo::allocator_cache_mem()),
TUnit::BYTES));
refresh_interval_memory_growth);
#ifdef ADDRESS_SANITIZER
msg = "[ASAN]" + msg;
#endif
Expand Down

0 comments on commit b9744cc

Please sign in to comment.