minimum value of maxEventsHint and s_maxevents, to reduce memory usage. */
static FDMultiplexer* getMultiplexerSilent(unsigned int maxEventsHint = s_maxevents);
- struct InRun {
+ struct InRun
+ {
InRun(const InRun&) = delete;
InRun(InRun&&) = delete;
InRun& operator=(const InRun&) = delete;
}
d_inrun = true;
}
- ~InRun() {
+ ~InRun()
+ {
d_inrun = false;
}
bool& d_inrun;
auto workers = RecThreadInfo::numTCPWorkers() + RecThreadInfo::numUDPWorkers() + 2;
auto mapsNeeded = 4ULL * g_maxMThreads * workers;
if (lim < mapsNeeded) {
- g_maxMThreads = lim / (4 * workers);
+ g_maxMThreads = static_cast<unsigned int>(lim / (4ULL * workers));
SLOG(g_log << Logger::Error << "sysctl vm.max_map_count= <" << mapsNeeded << ", this may cause 'bad_alloc' exceptions; adjusting max-mthreads to " << g_maxMThreads << endl,
log->info(Logr::Error, "sysctl vm.max_map_count < mapsNeeded, this may cause 'bad_alloc' exceptions, adjusting max-mthreads",
"kern.max_map_count", Logging::Loggable(lim), "mapsNeeded", Logging::Loggable(mapsNeeded),