Skip to content

Commit

Permalink
2
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyiZzz committed Sep 9, 2024
1 parent 7d41f55 commit c8b6c89
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions be/src/runtime/memory/global_memory_arbitrator.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ class GlobalMemoryArbitrator {
return _s_process_reserved_memory.load(std::memory_order_relaxed);
}

// `process_memory_usage` includes all reserved memory. if a thread has `reserved_memory`,
// and the memory allocated by thread is less than the thread `reserved_memory`,
// even if `process_memory_usage` is greater than `process_mem_limit`, memory can still be allocated.
// At this time, `process_memory_usage` will not increase, process physical memory will increase,
// and `reserved_memory` will be reduced.
static int64_t sub_thread_reserve_memory(int64_t bytes);

static bool is_exceed_soft_mem_limit(int64_t bytes = 0) {
Expand Down

0 comments on commit c8b6c89

Please sign in to comment.