Skip to content

Commit d5b7770

Browse files
committed
[prestissimo] Add async pushback for jemalloc purge
Summary: Make control of the internal memory pushback as following: 1) PeriodicMemoryChecker::systemMemLimitBytes controls the main server pushback. 2) FacebookPeriodicMemoryChecker::jemallocPurgeResidentLimitBytes_ and FacebookPeriodicMemoryChecker::jemallocPurgeDirtyLimitBytes_ controls the asynchronous pushback for jemalloc purge Reviewed By: xiaoxmeng Differential Revision: D75322220
1 parent a504c7c commit d5b7770

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

presto-native-execution/presto_cpp/main/PeriodicMemoryChecker.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#include "velox/common/time/Timer.h"
2323

2424
namespace facebook::presto {
25-
PeriodicMemoryChecker::PeriodicMemoryChecker(Config config)
26-
: config_(std::move(config)) {
25+
PeriodicMemoryChecker::PeriodicMemoryChecker(const Config& config)
26+
: config_(config) {
2727
if (config_.systemMemPushbackEnabled) {
2828
VELOX_CHECK_GT(config_.systemMemLimitBytes, 0);
2929
}

presto-native-execution/presto_cpp/main/PeriodicMemoryChecker.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class PeriodicMemoryChecker {
6565
size_t mallocBytesUsageDumpThreshold{20UL * 1024 * 1024 * 1024};
6666
};
6767

68-
explicit PeriodicMemoryChecker(Config config);
68+
explicit PeriodicMemoryChecker(const Config& config);
6969

7070
virtual ~PeriodicMemoryChecker() = default;
7171

@@ -74,7 +74,7 @@ class PeriodicMemoryChecker {
7474
virtual void start();
7575

7676
/// Stops the 'PeriodicMemoryChecker'.
77-
void stop();
77+
virtual void stop();
7878

7979
/// Returns the last known cached 'current' system memory usage in bytes.
8080
int64_t cachedSystemUsedMemoryBytes() const {

0 commit comments

Comments
 (0)