mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into engine-api
This commit is contained in:
commit
87d18664f9
|
@ -23,6 +23,7 @@
|
||||||
#include "ApplicationFeatures/JemallocFeature.h"
|
#include "ApplicationFeatures/JemallocFeature.h"
|
||||||
|
|
||||||
#include "Basics/FileUtils.h"
|
#include "Basics/FileUtils.h"
|
||||||
|
#include "Basics/StringUtils.h"
|
||||||
#include "Basics/process-utils.h"
|
#include "Basics/process-utils.h"
|
||||||
#include "Logger/Logger.h"
|
#include "Logger/Logger.h"
|
||||||
#include "ProgramOptions/ProgramOptions.h"
|
#include "ProgramOptions/ProgramOptions.h"
|
||||||
|
@ -123,6 +124,24 @@ void JemallocFeature::start() {
|
||||||
<< "' for VM files: " << strerror(errno);
|
<< "' for VM files: " << strerror(errno);
|
||||||
FATAL_ERROR_EXIT();
|
FATAL_ERROR_EXIT();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
std::vector<std::string> files = FileUtils::listFiles(_staticPath);
|
||||||
|
|
||||||
|
for (auto file : files) {
|
||||||
|
if (StringUtils::isPrefix(file, "vm.")) {
|
||||||
|
std::string full = FileUtils::buildFilename(_staticPath, file);
|
||||||
|
int en;
|
||||||
|
|
||||||
|
if (FileUtils::remove(full, &en)) {
|
||||||
|
LOG_TOPIC(TRACE, Logger::MEMORY)
|
||||||
|
<< "removed old file '" << full << "'";
|
||||||
|
} else {
|
||||||
|
LOG_TOPIC(FATAL, Logger::MEMORY)
|
||||||
|
<< "cannot remove file '" << full << "': " << strerror(en);
|
||||||
|
FATAL_ERROR_EXIT();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
adb_jemalloc_set_limit(static_cast<uint64_t>(_residentLimit), _staticPath);
|
adb_jemalloc_set_limit(static_cast<uint64_t>(_residentLimit), _staticPath);
|
||||||
|
|
Loading…
Reference in New Issue