aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-03 18:32:05 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-11-03 20:09:28 +0000
commit177a9d76f99ce259598f85f99b1d2ecf77a7fdd2 (patch)
tree8454656b13eb6376ab8599c066c8b7815efb94e6 /src/wallet
parentMerge pull request #4676 (diff)
downloadmonero-177a9d76f99ce259598f85f99b1d2ecf77a7fdd2.tar.xz
wallet: warn if lockable memory limit is too low
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet_args.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wallet/wallet_args.cpp b/src/wallet/wallet_args.cpp
index 95a4e0ad6..b9d0a6a75 100644
--- a/src/wallet/wallet_args.cpp
+++ b/src/wallet/wallet_args.cpp
@@ -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};
}
}