aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/ytalloc/impl/core-inl.h
diff options
context:
space:
mode:
authorilnurkh <ilnurkh@yandex-team.com>2023-10-09 23:39:40 +0300
committerilnurkh <ilnurkh@yandex-team.com>2023-10-09 23:57:14 +0300
commite601ca03f859335d57ecff2e5aa6af234b6052ed (patch)
treede519a847e58a1b3993fcbfe05ff44cc946a3e24 /library/cpp/ytalloc/impl/core-inl.h
parentbbf2b6878af3854815a2c0ecb07a687071787639 (diff)
downloadydb-e601ca03f859335d57ecff2e5aa6af234b6052ed.tar.gz
Y_VERIFY->Y_ABORT_UNLESS at ^l
https://clubs.at.yandex-team.ru/arcadia/29404
Diffstat (limited to 'library/cpp/ytalloc/impl/core-inl.h')
-rw-r--r--library/cpp/ytalloc/impl/core-inl.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/ytalloc/impl/core-inl.h b/library/cpp/ytalloc/impl/core-inl.h
index c02a983a2c..64e95188f4 100644
--- a/library/cpp/ytalloc/impl/core-inl.h
+++ b/library/cpp/ytalloc/impl/core-inl.h
@@ -1237,7 +1237,7 @@ private:
if (result != 0) {
auto error = errno;
// Failure is possible for locked pages.
- Y_VERIFY(error == EINVAL);
+ Y_ABORT_UNLESS(error == EINVAL);
}
}
@@ -1895,7 +1895,7 @@ public:
static void SetCurrentMemoryTag(TMemoryTag tag)
{
- Y_VERIFY(tag <= MaxMemoryTag);
+ Y_ABORT_UNLESS(tag <= MaxMemoryTag);
(&ThreadControlWord_)->Parts.MemoryTag = tag;
}
@@ -1929,13 +1929,13 @@ private:
void RefThreadState(TThreadState* state)
{
auto result = ++state->RefCounter;
- Y_VERIFY(result > 1);
+ Y_ABORT_UNLESS(result > 1);
}
void UnrefThreadState(TThreadState* state)
{
auto result = --state->RefCounter;
- Y_VERIFY(result >= 0);
+ Y_ABORT_UNLESS(result >= 0);
if (result == 0) {
DestroyThreadState(state);
}
@@ -2518,7 +2518,7 @@ void* TSystemAllocator::Allocate(size_t size)
void* mmappedPtr;
while (true) {
auto currentPtr = CurrentPtr_.fetch_add(rawSize);
- Y_VERIFY(currentPtr + rawSize <= SystemZoneEnd);
+ Y_ABORT_UNLESS(currentPtr + rawSize <= SystemZoneEnd);
mmappedPtr = MappedMemoryManager->Map(
currentPtr,
rawSize,
@@ -4404,7 +4404,7 @@ Y_FORCE_INLINE TThreadState* TThreadManager::FindThreadState()
InitializeGlobals();
// InitializeGlobals must not allocate.
- Y_VERIFY(!ThreadState_);
+ Y_ABORT_UNLESS(!ThreadState_);
ThreadState_ = ThreadManager->AllocateThreadState();
(&ThreadControlWord_)->Parts.ThreadStateValid = true;