mirror of
https://github.com/monero-project/monero.git
synced 2026-01-07 02:04:02 -08:00
wallet: warn if lockable memory limit is too low
This commit is contained in:
@@ -211,6 +211,14 @@ namespace wallet_args
|
||||
|
||||
Print(print) << boost::format(wallet_args::tr("Logging to %s")) % log_path;
|
||||
|
||||
const ssize_t lockable_memory = tools::get_lockable_memory();
|
||||
if (lockable_memory >= 0 && lockable_memory < 256 * 4096) // 256 pages -> at least 256 secret keys and other such small/medium objects
|
||||
Print(print) << tr("WARNING: You may not have a high enough lockable memory limit")
|
||||
#ifdef ELPP_OS_UNIX
|
||||
<< ", " << tr("see ulimit -l")
|
||||
#endif
|
||||
;
|
||||
|
||||
return {std::move(vm), should_terminate};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user