aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/malloc
diff options
context:
space:
mode:
authornga <nga@yandex-team.ru>2022-02-10 16:48:09 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:09 +0300
commit1f553f46fb4f3c5eec631352cdd900a0709016af (patch)
treea231fba2c03b440becaea6c86a2702d0bfb0336e /library/cpp/malloc
parentc4de7efdedc25b49cbea74bd589eecb61b55b60a (diff)
downloadydb-1f553f46fb4f3c5eec631352cdd900a0709016af.tar.gz
Restoring authorship annotation for <nga@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/malloc')
-rw-r--r--library/cpp/malloc/api/malloc.cpp4
-rw-r--r--library/cpp/malloc/api/malloc.h22
-rw-r--r--library/cpp/malloc/api/ut/ut.cpp12
-rw-r--r--library/cpp/malloc/api/ut/ya.make16
-rw-r--r--library/cpp/malloc/api/ya.make20
-rw-r--r--library/cpp/malloc/jemalloc/malloc-info.cpp14
-rw-r--r--library/cpp/malloc/jemalloc/ya.make14
-rw-r--r--library/cpp/malloc/ya.make4
8 files changed, 53 insertions, 53 deletions
diff --git a/library/cpp/malloc/api/malloc.cpp b/library/cpp/malloc/api/malloc.cpp
index eed1c58a38..6f646033b7 100644
--- a/library/cpp/malloc/api/malloc.cpp
+++ b/library/cpp/malloc/api/malloc.cpp
@@ -1,8 +1,8 @@
#include <stdlib.h>
#include <stdio.h>
-#include "malloc.h"
-
+#include "malloc.h"
+
namespace {
bool SetEmptyParam(const char*, const char*) {
return false;
diff --git a/library/cpp/malloc/api/malloc.h b/library/cpp/malloc/api/malloc.h
index ebd545d6dd..3185cb3769 100644
--- a/library/cpp/malloc/api/malloc.h
+++ b/library/cpp/malloc/api/malloc.h
@@ -1,25 +1,25 @@
-#pragma once
-
+#pragma once
+
#include <string.h>
#include <util/system/compiler.h>
-namespace NMalloc {
- struct TMallocInfo {
- TMallocInfo();
+namespace NMalloc {
+ struct TMallocInfo {
+ TMallocInfo();
- const char* Name;
+ const char* Name;
bool (*SetParam)(const char* param, const char* value);
const char* (*GetParam)(const char* param);
bool (*CheckParam)(const char* param, bool defaultValue);
- };
-
+ };
+
extern volatile bool IsAllocatorCorrupted;
void AbortFromCorruptedAllocator(const char* errorMessage = nullptr);
- // this function should be implemented by malloc implementations
- TMallocInfo MallocInfo();
+ // this function should be implemented by malloc implementations
+ TMallocInfo MallocInfo();
struct TAllocHeader {
void* Block;
@@ -29,4 +29,4 @@ namespace NMalloc {
AllocSize = size | signature;
}
};
-}
+}
diff --git a/library/cpp/malloc/api/ut/ut.cpp b/library/cpp/malloc/api/ut/ut.cpp
index 7eccd0bf8d..d806b6f637 100644
--- a/library/cpp/malloc/api/ut/ut.cpp
+++ b/library/cpp/malloc/api/ut/ut.cpp
@@ -1,10 +1,10 @@
#include <library/cpp/testing/unittest/registar.h>
-
+
#include <library/cpp/malloc/api/malloc.h>
-
+
Y_UNIT_TEST_SUITE(MallocApi) {
Y_UNIT_TEST(ToStream) {
- TStringStream ss;
- ss << NMalloc::MallocInfo();
- }
-}
+ TStringStream ss;
+ ss << NMalloc::MallocInfo();
+ }
+}
diff --git a/library/cpp/malloc/api/ut/ya.make b/library/cpp/malloc/api/ut/ya.make
index e57225b45d..8ce4ce20cf 100644
--- a/library/cpp/malloc/api/ut/ya.make
+++ b/library/cpp/malloc/api/ut/ya.make
@@ -1,13 +1,13 @@
UNITTEST()
-
-OWNER(nga)
-
+
+OWNER(nga)
+
PEERDIR(
library/cpp/malloc/api/helpers
)
-SRCS(
- ut.cpp
-)
-
-END()
+SRCS(
+ ut.cpp
+)
+
+END()
diff --git a/library/cpp/malloc/api/ya.make b/library/cpp/malloc/api/ya.make
index 0ebaa0c589..fdf6c294ea 100644
--- a/library/cpp/malloc/api/ya.make
+++ b/library/cpp/malloc/api/ya.make
@@ -1,11 +1,11 @@
-LIBRARY()
-
+LIBRARY()
+
NO_UTIL()
-
-OWNER(nga)
-
-SRCS(
- malloc.cpp
-)
-
-END()
+
+OWNER(nga)
+
+SRCS(
+ malloc.cpp
+)
+
+END()
diff --git a/library/cpp/malloc/jemalloc/malloc-info.cpp b/library/cpp/malloc/jemalloc/malloc-info.cpp
index 2643ca4766..060cce9fa9 100644
--- a/library/cpp/malloc/jemalloc/malloc-info.cpp
+++ b/library/cpp/malloc/jemalloc/malloc-info.cpp
@@ -1,5 +1,5 @@
#include <library/cpp/malloc/api/malloc.h>
-
+
using namespace NMalloc;
#if defined(_MSC_VER)
@@ -12,7 +12,7 @@ TMallocInfo NMalloc::MallocInfo() {
#include <strings.h>
#include <stdlib.h>
#include <inttypes.h>
-
+
#include <contrib/libs/jemalloc/include/jemalloc/jemalloc.h>
namespace {
@@ -55,11 +55,11 @@ namespace {
}
}
-TMallocInfo NMalloc::MallocInfo() {
- TMallocInfo r;
- r.Name = "jemalloc";
+TMallocInfo NMalloc::MallocInfo() {
+ TMallocInfo r;
+ r.Name = "jemalloc";
r.SetParam = JESetParam;
r.GetParam = JEGetParam;
- return r;
-}
+ return r;
+}
#endif
diff --git a/library/cpp/malloc/jemalloc/ya.make b/library/cpp/malloc/jemalloc/ya.make
index 99db474eab..0398578d6c 100644
--- a/library/cpp/malloc/jemalloc/ya.make
+++ b/library/cpp/malloc/jemalloc/ya.make
@@ -1,9 +1,9 @@
-LIBRARY()
-
+LIBRARY()
+
NO_UTIL()
-
-OWNER(nga)
-
+
+OWNER(nga)
+
IF (OS_ANDROID)
PEERDIR(
library/cpp/malloc/system
@@ -17,5 +17,5 @@ ELSE()
malloc-info.cpp
)
ENDIF()
-
-END()
+
+END()
diff --git a/library/cpp/malloc/ya.make b/library/cpp/malloc/ya.make
index 0ec9db71d2..045d1e24f2 100644
--- a/library/cpp/malloc/ya.make
+++ b/library/cpp/malloc/ya.make
@@ -1,4 +1,4 @@
-RECURSE(
+RECURSE(
api
api/helpers
api/ut
@@ -13,7 +13,7 @@ RECURSE(
mimalloc/link_test
hu
hu/link_test
-)
+)
IF (NOT OS_WINDOWS)
RECURSE(