summaryrefslogtreecommitdiffstats
path: root/library/cpp/ytalloc/api
diff options
context:
space:
mode:
authorbabenko <[email protected]>2026-01-25 16:17:55 +0300
committerbabenko <[email protected]>2026-01-25 16:35:39 +0300
commitef88ddededc09660d4a265a630a89bcdb9c84c89 (patch)
tree7f795742235248c5456f69cfb69745ad299394dc /library/cpp/ytalloc/api
parentbe3571e46ca0b3cb22d30e058710f8d1dae60376 (diff)
YT-17905: Drop unused peerdir
commit_hash:579e0752cfe1226a83d5b52df5ba612ad4621493
Diffstat (limited to 'library/cpp/ytalloc/api')
-rw-r--r--library/cpp/ytalloc/api/README.md6
-rw-r--r--library/cpp/ytalloc/api/fallback.cpp202
-rw-r--r--library/cpp/ytalloc/api/ya.make12
3 files changed, 0 insertions, 220 deletions
diff --git a/library/cpp/ytalloc/api/README.md b/library/cpp/ytalloc/api/README.md
deleted file mode 100644
index 1b57e81b5cf..00000000000
--- a/library/cpp/ytalloc/api/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-This lightweight module can be used by anyone interested in YTAlloc
-functionality (memory allocation and disposal, memory tagging, etc).
-
-If YTAlloc happens to be linked in, it provides an efficient implementation.
-Otherwise (non-YTAlloc build), weak implementations from fallback.cpp
-are used. \ No newline at end of file
diff --git a/library/cpp/ytalloc/api/fallback.cpp b/library/cpp/ytalloc/api/fallback.cpp
deleted file mode 100644
index d7dca33f88e..00000000000
--- a/library/cpp/ytalloc/api/fallback.cpp
+++ /dev/null
@@ -1,202 +0,0 @@
-// This file contains the fallback implementations of YTAlloc-specific stuff.
-// These implementations are annotated with Y_WEAK to ensure that if the actual YTAlloc
-// is available at the link time, the latter is preferred over the fallback.
-#include "ytalloc.h"
-
-#include <util/system/compiler.h>
-#include <util/system/yassert.h>
-
-#include <cstdlib>
-
-namespace NYT::NYTAlloc {
-
-////////////////////////////////////////////////////////////////////////////////
-
-Y_WEAK void* Allocate(size_t size)
-{
- return ::malloc(size);
-}
-
-Y_WEAK void* AllocatePageAligned(size_t size)
-{
-#if defined(_win_)
- return ::_aligned_malloc(size, PageSize);
-#elif defined(_darwin_) || !defined(_musl_)
- return ::valloc(size);
-#else
- return ::memalign(PageSize, size);
-#endif
-}
-
-Y_WEAK void* AllocateSmall(size_t rank)
-{
- return ::malloc(SmallRankToSize[rank]);
-}
-
-Y_WEAK void Free(void* ptr)
-{
- ::free(ptr);
-}
-
-Y_WEAK void FreeNonNull(void* ptr)
-{
- Y_ASSERT(ptr);
- ::free(ptr);
-}
-
-Y_WEAK size_t GetAllocationSize(const void* /*ptr*/)
-{
- return 0;
-}
-
-Y_WEAK size_t GetAllocationSize(size_t size)
-{
- return size;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-Y_WEAK void SetCurrentMemoryZone(EMemoryZone /*zone*/)
-{ }
-
-Y_WEAK EMemoryZone GetCurrentMemoryZone()
-{
- return EMemoryZone::Normal;
-}
-
-Y_WEAK EMemoryZone GetAllocationMemoryZone(const void* /*ptr*/)
-{
- return EMemoryZone::Normal;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-Y_WEAK void SetCurrentFiberId(TFiberId /*id*/)
-{ }
-
-Y_WEAK TFiberId GetCurrentFiberId()
-{
- return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-Y_WEAK void EnableLogging(TLogHandler /*logHandler*/)
-{ }
-
-////////////////////////////////////////////////////////////////////////////////
-
-Y_WEAK void SetBacktraceProvider(TBacktraceProvider /*provider*/)
-{ }
-
-Y_WEAK void SetBacktraceFormatter(TBacktraceFormatter /*formatter*/)
-{ }
-
-////////////////////////////////////////////////////////////////////////////////
-
-Y_WEAK void EnableStockpile()
-{ }
-
-Y_WEAK void SetStockpileInterval(TDuration /*value*/)
-{ }
-
-Y_WEAK void SetStockpileThreadCount(int /*value*/)
-{ }
-
-Y_WEAK void SetStockpileSize(size_t /*value*/)
-{ }
-
-Y_WEAK void SetLargeUnreclaimableCoeff(double /*value*/)
-{ }
-
-Y_WEAK void SetMinLargeUnreclaimableBytes(size_t /*value*/)
-{ }
-
-Y_WEAK void SetMaxLargeUnreclaimableBytes(size_t /*value*/)
-{ }
-
-Y_WEAK void SetTimingEventThreshold(TDuration /*value*/)
-{ }
-
-Y_WEAK void SetAllocationProfilingEnabled(bool /*value*/)
-{ }
-
-Y_WEAK void SetAllocationProfilingSamplingRate(double /*rate*/)
-{ }
-
-Y_WEAK void SetSmallArenaAllocationProfilingEnabled(size_t /*rank*/, bool /*value*/)
-{ }
-
-Y_WEAK void SetLargeArenaAllocationProfilingEnabled(size_t /*rank*/, bool /*value*/)
-{ }
-
-Y_WEAK void SetProfilingBacktraceDepth(int /*depth*/)
-{ }
-
-Y_WEAK void SetMinProfilingBytesUsedToReport(size_t /*size*/)
-{ }
-
-Y_WEAK void SetEnableEagerMemoryRelease(bool /*value*/)
-{ }
-
-Y_WEAK void SetEnableMadvisePopulate(bool /*value*/)
-{ }
-
-////////////////////////////////////////////////////////////////////////////////
-
-Y_WEAK TEnumIndexedArray<ETotalCounter, ssize_t> GetTotalAllocationCounters()
-{
- return {};
-}
-
-Y_WEAK TEnumIndexedArray<ESmallCounter, ssize_t> GetSmallAllocationCounters()
-{
- return {};
-}
-
-Y_WEAK TEnumIndexedArray<ELargeCounter, ssize_t> GetLargeAllocationCounters()
-{
- return {};
-}
-
-Y_WEAK std::array<TEnumIndexedArray<ESmallArenaCounter, ssize_t>, SmallRankCount> GetSmallArenaAllocationCounters()
-{
- return {};
-}
-
-Y_WEAK std::array<TEnumIndexedArray<ELargeArenaCounter, ssize_t>, LargeRankCount> GetLargeArenaAllocationCounters()
-{
- return {};
-}
-
-Y_WEAK TEnumIndexedArray<EHugeCounter, ssize_t> GetHugeAllocationCounters()
-{
- return {};
-}
-
-Y_WEAK TEnumIndexedArray<ESystemCounter, ssize_t> GetSystemAllocationCounters()
-{
- return {};
-}
-
-Y_WEAK TEnumIndexedArray<EUndumpableCounter, ssize_t> GetUndumpableAllocationCounters()
-{
- return {};
-}
-
-Y_WEAK TEnumIndexedArray<ETimingEventType, TTimingEventCounters> GetTimingEventCounters()
-{
- return {};
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-Y_WEAK std::vector<TProfiledAllocation> GetProfiledAllocationStatistics()
-{
- return {};
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-} // namespace NYT::NYTAlloc
-
diff --git a/library/cpp/ytalloc/api/ya.make b/library/cpp/ytalloc/api/ya.make
deleted file mode 100644
index 9cec6be14c4..00000000000
--- a/library/cpp/ytalloc/api/ya.make
+++ /dev/null
@@ -1,12 +0,0 @@
-LIBRARY()
-
-SRCS(
- fallback.cpp
-)
-
-PEERDIR(
- library/cpp/yt/misc
- library/cpp/yt/containers
-)
-
-END()