aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/balloc
diff options
context:
space:
mode:
authormvel <mvel@yandex-team.ru>2022-02-10 16:45:41 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:41 +0300
commit43f5a35593ebc9f6bcea619bb170394ea7ae468e (patch)
treee98df59de24d2ef7c77baed9f41e4875a2fef972 /library/cpp/balloc
parentbd30392c4cc92487950adc375c07adf52da1d592 (diff)
downloadydb-43f5a35593ebc9f6bcea619bb170394ea7ae468e.tar.gz
Restoring authorship annotation for <mvel@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/balloc')
-rw-r--r--library/cpp/balloc/balloc.cpp26
-rw-r--r--library/cpp/balloc/ya.make6
2 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/balloc/balloc.cpp b/library/cpp/balloc/balloc.cpp
index 4fb8cdfc65..fab489db4c 100644
--- a/library/cpp/balloc/balloc.cpp
+++ b/library/cpp/balloc/balloc.cpp
@@ -200,12 +200,12 @@ void operator delete[](void* p, const std::nothrow_t&) OP_THROWNOTHING {
#endif
}
-extern "C" void* calloc(size_t n, size_t elemSize) {
- const size_t size = n * elemSize;
+extern "C" void* calloc(size_t n, size_t elemSize) {
+ const size_t size = n * elemSize;
- if (elemSize != 0 && size / elemSize != n) {
- return nullptr;
- }
+ if (elemSize != 0 && size / elemSize != n) {
+ return nullptr;
+ }
#if defined(Y_COVER_PTR)
void* result = malloc(size);
@@ -213,7 +213,7 @@ extern "C" void* calloc(size_t n, size_t elemSize) {
void* result = NBalloc::Malloc(size);
#endif
- if (result) {
+ if (result) {
memset(result, 0, size);
}
@@ -231,19 +231,19 @@ extern "C" void cfree(void* ptr) {
#if defined(Y_COVER_PTR)
static inline void* DoRealloc(void* oldPtr, size_t newSize) {
#else
-extern "C" void* realloc(void* oldPtr, size_t newSize) {
+extern "C" void* realloc(void* oldPtr, size_t newSize) {
#endif
- if (!oldPtr) {
+ if (!oldPtr) {
void* result = NBalloc::Malloc(newSize);
return result;
}
if (newSize == 0) {
NBalloc::Free(oldPtr);
- return nullptr;
+ return nullptr;
}
void* newPtr = NBalloc::Malloc(newSize);
- if (!newPtr) {
- return nullptr;
+ if (!newPtr) {
+ return nullptr;
}
NBalloc::TAllocHeader* header = (NBalloc::TAllocHeader*)oldPtr - 1;
const size_t oldSize = header->AllocSize & ~NBalloc::SIGNATURE_MASK;
@@ -253,8 +253,8 @@ extern "C" void* realloc(void* oldPtr, size_t newSize) {
NBalloc::Free(oldPtr);
return newPtr;
}
- NMalloc::AbortFromCorruptedAllocator();
- return nullptr;
+ NMalloc::AbortFromCorruptedAllocator();
+ return nullptr;
}
#if defined(Y_COVER_PTR)
diff --git a/library/cpp/balloc/ya.make b/library/cpp/balloc/ya.make
index 84b634c24e..d4457fbba9 100644
--- a/library/cpp/balloc/ya.make
+++ b/library/cpp/balloc/ya.make
@@ -1,9 +1,9 @@
LIBRARY()
-OWNER(
- ironpeter
+OWNER(
+ ironpeter
g:base
-)
+)
NO_UTIL()
NO_COMPILER_WARNINGS()