Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include "velox/common/time/Timer.h"

namespace facebook::presto {
PeriodicMemoryChecker::PeriodicMemoryChecker(Config config)
: config_(std::move(config)) {
PeriodicMemoryChecker::PeriodicMemoryChecker(const Config& config)
: config_(config) {
if (config_.systemMemPushbackEnabled) {
VELOX_CHECK_GT(config_.systemMemLimitBytes, 0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class PeriodicMemoryChecker {
size_t mallocBytesUsageDumpThreshold{20UL * 1024 * 1024 * 1024};
};

explicit PeriodicMemoryChecker(Config config);
explicit PeriodicMemoryChecker(const Config& config);

virtual ~PeriodicMemoryChecker() = default;

Expand All @@ -74,7 +74,7 @@ class PeriodicMemoryChecker {
virtual void start();

/// Stops the 'PeriodicMemoryChecker'.
void stop();
virtual void stop();

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