summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-02-15 21:46:52 +0100
committerGitHub <noreply@github.com>2021-02-15 21:46:52 +0100
commit8f51df8d57ded584647d588114f92e6ea226ff5a (patch)
tree19a3c20ddc854ef41eee98980361805ac851ac26
parent6d22f9151a35b9fddb55122cd5ceb3356a628e84 (diff)
parentf0c23735ff529315700f9578d502c8cde6ea2f29 (diff)
Merge pull request #16520 from vespa-engine/toregge/setup-mmap-file-allocator-factory
Setup MmapFileAllocatorFactory.
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
index 1b615d765f0..f50fd7e2a07 100644
--- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
@@ -37,6 +37,7 @@
#include <vespa/vespalib/util/blockingthreadstackexecutor.h>
#include <vespa/vespalib/util/host_name.h>
#include <vespa/vespalib/util/lambdatask.h>
+#include <vespa/vespalib/util/mmap_file_allocator_factory.h>
#include <vespa/vespalib/util/random.h>
#include <vespa/searchlib/aggregation/forcelink.hpp>
@@ -302,6 +303,7 @@ Proton::init(const BootstrapConfig::SP & configSnapshot)
}
_protonDiskLayout = std::make_unique<ProtonDiskLayout>(protonConfig.basedir, protonConfig.tlsspec);
vespalib::chdir(protonConfig.basedir);
+ vespalib::alloc::MmapFileAllocatorFactory::instance().setup(protonConfig.basedir + "/swapdirs");
_tls->start();
_flushEngine = std::make_unique<FlushEngine>(std::make_shared<flushengine::TlsStatsFactory>(_tls->getTransLogServer()),
strategy, flush.maxconcurrent, vespalib::from_s(flush.idleinterval));