mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
Add error handling for mlock
This commit is contained in:
parent
b5545c1575
commit
65f9519917
|
@ -96,7 +96,9 @@ class Manager
|
||||||
LOG(debug) << "created/opened shared memory segment '" << "fmq_" << fShmId << "_main" << "' of " << fSegment.get_size() << " bytes. Available are " << fSegment.get_free_memory() << " bytes.";
|
LOG(debug) << "created/opened shared memory segment '" << "fmq_" << fShmId << "_main" << "' of " << fSegment.get_size() << " bytes. Available are " << fSegment.get_free_memory() << " bytes.";
|
||||||
if (mlockSegment) {
|
if (mlockSegment) {
|
||||||
LOG(debug) << "Locking the managed segment memory pages...";
|
LOG(debug) << "Locking the managed segment memory pages...";
|
||||||
mlock(fSegment.get_address(), fSegment.get_size());
|
if (mlock(fSegment.get_address(), fSegment.get_size()) == -1) {
|
||||||
|
LOG(error) << "Could not lock the managed segment memory. Code: " << errno << ", reason: " << strerror(errno);
|
||||||
|
}
|
||||||
LOG(debug) << "Successfully locked the managed segment memory pages.";
|
LOG(debug) << "Successfully locked the managed segment memory pages.";
|
||||||
}
|
}
|
||||||
if (zeroSegment) {
|
if (zeroSegment) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user