aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/malloc
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-02-18 15:49:59 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-02-18 15:49:59 +0300
commitb4cb34dfb2619f594d82e512fd9ff7fc97400133 (patch)
tree6a64ab25a145265287789bceed3f59e953561206 /library/cpp/malloc
parent5e837a820d5be0671fa4096a1cc1e378453e5132 (diff)
downloadydb-b4cb34dfb2619f594d82e512fd9ff7fc97400133.tar.gz
intermediate changes
ref:1a0585d83f27cb6fb5b9c4f68a08177e10faf3b3
Diffstat (limited to 'library/cpp/malloc')
-rw-r--r--library/cpp/malloc/api/CMakeLists.txt7
-rw-r--r--library/cpp/malloc/jemalloc/CMakeLists.txt9
-rw-r--r--library/cpp/malloc/system/malloc-info.cpp9
-rw-r--r--library/cpp/malloc/system/ya.make17
-rw-r--r--library/cpp/malloc/tcmalloc/CMakeLists.txt9
5 files changed, 51 insertions, 0 deletions
diff --git a/library/cpp/malloc/api/CMakeLists.txt b/library/cpp/malloc/api/CMakeLists.txt
new file mode 100644
index 0000000000..6b137ece25
--- /dev/null
+++ b/library/cpp/malloc/api/CMakeLists.txt
@@ -0,0 +1,7 @@
+add_library(cpp-malloc-api)
+target_link_libraries(cpp-malloc-api PUBLIC
+ contrib-libs-cxxsupp
+)
+target_sources(cpp-malloc-api PRIVATE
+ ${CMAKE_SOURCE_DIR}/library/cpp/malloc/api/malloc.cpp
+)
diff --git a/library/cpp/malloc/jemalloc/CMakeLists.txt b/library/cpp/malloc/jemalloc/CMakeLists.txt
new file mode 100644
index 0000000000..5db1ef0046
--- /dev/null
+++ b/library/cpp/malloc/jemalloc/CMakeLists.txt
@@ -0,0 +1,9 @@
+add_library(cpp-malloc-jemalloc)
+target_link_libraries(cpp-malloc-jemalloc PUBLIC
+ contrib-libs-cxxsupp
+ cpp-malloc-api
+ contrib-libs-jemalloc
+)
+target_sources(cpp-malloc-jemalloc PRIVATE
+ ${CMAKE_SOURCE_DIR}/library/cpp/malloc/jemalloc/malloc-info.cpp
+)
diff --git a/library/cpp/malloc/system/malloc-info.cpp b/library/cpp/malloc/system/malloc-info.cpp
new file mode 100644
index 0000000000..ab6742e203
--- /dev/null
+++ b/library/cpp/malloc/system/malloc-info.cpp
@@ -0,0 +1,9 @@
+#include <library/cpp/malloc/api/malloc.h>
+
+using namespace NMalloc;
+
+TMallocInfo NMalloc::MallocInfo() {
+ TMallocInfo r;
+ r.Name = "system";
+ return r;
+}
diff --git a/library/cpp/malloc/system/ya.make b/library/cpp/malloc/system/ya.make
new file mode 100644
index 0000000000..7dd2d6d9d4
--- /dev/null
+++ b/library/cpp/malloc/system/ya.make
@@ -0,0 +1,17 @@
+LIBRARY()
+
+NO_UTIL()
+
+OWNER(nga)
+
+DISABLE(OPENSOURCE_EXPORT)
+
+PEERDIR(
+ library/cpp/malloc/api
+)
+
+SRCS(
+ malloc-info.cpp
+)
+
+END()
diff --git a/library/cpp/malloc/tcmalloc/CMakeLists.txt b/library/cpp/malloc/tcmalloc/CMakeLists.txt
new file mode 100644
index 0000000000..94fe6e429f
--- /dev/null
+++ b/library/cpp/malloc/tcmalloc/CMakeLists.txt
@@ -0,0 +1,9 @@
+add_library(cpp-malloc-tcmalloc)
+target_link_libraries(cpp-malloc-tcmalloc PUBLIC
+ contrib-libs-cxxsupp
+ cpp-malloc-api
+ libs-tcmalloc-malloc_extension
+)
+target_sources(cpp-malloc-tcmalloc PRIVATE
+ ${CMAKE_SOURCE_DIR}/library/cpp/malloc/tcmalloc/malloc-info.cpp
+)