Commit 9cb38044 authored by Lucian Grijincu's avatar Lucian Grijincu Committed by Facebook Github Bot

folly: MemoryMapping: less verbose warning on TRY_LOCK+ENOMEM failures

Reviewed By: philippv

Differential Revision: D4184097

fbshipit-source-id: 2f1f82b845528fea4667af612c92c348f8d9ec25
parent 2187ccc9
......@@ -258,10 +258,11 @@ bool MemoryMapping::mlock(LockMode lock) {
}
auto msg =
folly::sformat("mlock({}) failed at {}", mapLength_, amountSucceeded);
if (lock == LockMode::TRY_LOCK && (errno == EPERM || errno == ENOMEM)) {
folly::format("mlock({}) failed at {}", mapLength_, amountSucceeded);
if (lock == LockMode::TRY_LOCK && errno == EPERM) {
PLOG(WARNING) << msg;
} else if (lock == LockMode::TRY_LOCK && errno == ENOMEM) {
VLOG(1) << msg;
} else {
PLOG(FATAL) << msg;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment