Skip to content

Commit

Permalink
9
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyiZzz committed Aug 13, 2024
1 parent 6f81b7e commit ecb9362
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion be/src/util/mem_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ void MemInfo::refresh_proc_meminfo() {
if (mem_available < 0) {
mem_available = _s_cgroup_mem_limit - _s_cgroup_mem_usage;
} else {
mem_available = std::min(mem_available, (_s_cgroup_mem_limit - _s_cgroup_mem_usage));
mem_available = std::min(mem_available, _s_cgroup_mem_limit - _s_cgroup_mem_usage);
}
}
if (mem_available < 0) {
Expand Down
4 changes: 2 additions & 2 deletions be/test/util/cgroup_util_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ TEST_F(CGroupUtilTest, ReadMetrics) {

TEST_F(CGroupUtilTest, memlimit) {
LOG(INFO) << CGroupMemoryCtl::debug_string();
uint64_t mem_limit;
uint64_t mem_usage;
int64_t mem_limit;
int64_t mem_usage;
auto status1 = CGroupMemoryCtl::find_cgroup_mem_limit(&mem_limit);
auto status2 = CGroupMemoryCtl::find_cgroup_mem_usage(&mem_usage);
if (CGroupUtil::cgroupsv1_enable() || CGroupUtil::cgroupsv2_enable()) {
Expand Down

0 comments on commit ecb9362

Please sign in to comment.