summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2021-02-15 16:21:25 +0100
committerTor Egge <Tor.Egge@broadpark.no>2021-02-15 16:24:49 +0100
commitf0c23735ff529315700f9578d502c8cde6ea2f29 (patch)
tree182b86d692c83afd05f3d6a9ee552dc0ab540efc /searchcore
parent5af363f3719022109420254e6162d3132ae69cb1 (diff)
Setup MmapFileAllocatorFactory.
Diffstat (limited to 'searchcore')
-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));