Skip to content

Commit 12792b7

Browse files
authored
Merge pull request #228 from sy-c/master
v2.13.1
2 parents 4666a7d + 6ec6f81 commit 12792b7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/MemoryBankManager.cxx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,13 @@ std::shared_ptr<MemoryPagesPool> MemoryBankManager::getPagedPool(size_t pageSize
134134
theLog.log(LogInfoDevel, "Zero memory");
135135
void *blockAddress = &(((char*)baseAddress)[offset]);
136136
// ensure pages stay in RAM
137-
// no need to lock them now, we write the full range on next line. keep them locked then. this is faster.
138-
mlock2(blockAddress, blockSize, MLOCK_ONFAULT);
137+
#ifdef MLOCK_ONFAULT
138+
// only on Linux
139+
// no need to lock them now, we write the full range on next line. keep them locked then. this is faster.
140+
mlock2(blockAddress, blockSize, MLOCK_ONFAULT);
141+
#else
142+
mlock(blockAddress, blockSize);
143+
#endif
139144
bzero(blockAddress, blockSize);
140145
theLog.log(LogInfoDevel, "Zero memory done");
141146

src/ReadoutVersion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#define READOUT_VERSION "2.13.0"
12+
#define READOUT_VERSION "2.13.1"
1313

0 commit comments

Comments
 (0)