aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/mlock.cpp
diff options
context:
space:
mode:
authorIlnur Khuziev <ilnur.khuziev@yandex.ru>2022-02-10 16:46:14 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:14 +0300
commit60040c91ffe701a84689b2c6310ff845e65cff42 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/system/mlock.cpp
parent736dcd8ca259457a136f2f9f9168c44643914323 (diff)
downloadydb-60040c91ffe701a84689b2c6310ff845e65cff42.tar.gz
Restoring authorship annotation for Ilnur Khuziev <ilnur.khuziev@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/mlock.cpp')
-rw-r--r--util/system/mlock.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/util/system/mlock.cpp b/util/system/mlock.cpp
index a47f94a993..435338c98f 100644
--- a/util/system/mlock.cpp
+++ b/util/system/mlock.cpp
@@ -54,27 +54,27 @@ void UnlockMemory(const void* addr, size_t len) {
void LockAllMemory(ELockAllMemoryFlags flags) {
Y_UNUSED(flags);
-#if defined(_android_)
+#if defined(_android_)
// unimplemented
-#elif defined(_cygwin_)
+#elif defined(_cygwin_)
// unimplemented
-#elif defined(_unix_)
- int sys_flags = 0;
+#elif defined(_unix_)
+ int sys_flags = 0;
if (flags & LockCurrentMemory) {
- sys_flags |= MCL_CURRENT;
- }
+ sys_flags |= MCL_CURRENT;
+ }
if (flags & LockFutureMemory) {
- sys_flags |= MCL_FUTURE;
- }
+ sys_flags |= MCL_FUTURE;
+ }
if (flags & LockMemoryOnFault) {
sys_flags |= MCL_ONFAULT;
}
- if (mlockall(sys_flags)) {
- ythrow yexception() << LastSystemErrorText();
- }
-#endif
-}
-
+ if (mlockall(sys_flags)) {
+ ythrow yexception() << LastSystemErrorText();
+ }
+#endif
+}
+
void UnlockAllMemory() {
#if defined(_cygwin_)
// unimplemented