diff options
author | Ivan <ilezhankin@yandex-team.ru> | 2025-02-11 21:04:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-11 21:04:10 +0300 |
commit | 5c9045cc4c70a9285a0302e1ea4daba7bb4306fd (patch) | |
tree | 0b35209f0285fefbe6ae0b1ccc57e79527b321b1 | |
parent | 0a47e49538472a88145552ffa171b158c13eb7ab (diff) | |
download | ydb-5c9045cc4c70a9285a0302e1ea4daba7bb4306fd.tar.gz |
Allow to enable default allocator via config on start (#14372)
-rw-r--r-- | ydb/core/driver_lib/run/run.cpp | 5 | ||||
-rw-r--r-- | ydb/core/protos/alloc.proto | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/ydb/core/driver_lib/run/run.cpp b/ydb/core/driver_lib/run/run.cpp index 45ec80cdae..fc111a854c 100644 --- a/ydb/core/driver_lib/run/run.cpp +++ b/ydb/core/driver_lib/run/run.cpp @@ -1057,6 +1057,11 @@ void TKikimrRunner::InitializeAllocator(const TKikimrRunConfig& runConfig) { for (const auto& a : allocConfig.GetParam()) { NMalloc::MallocInfo().SetParam(a.first.c_str(), a.second.c_str()); } +#if defined(ALLOW_DEFAULT_ALLOCATOR) + if (allocConfig.GetEnableDefaultAllocator()) { + NKikimr::UseDefaultAllocator(); + } +#endif } void TKikimrRunner::InitializeAppData(const TKikimrRunConfig& runConfig) diff --git a/ydb/core/protos/alloc.proto b/ydb/core/protos/alloc.proto index 9d73ab2183..696510da7b 100644 --- a/ydb/core/protos/alloc.proto +++ b/ydb/core/protos/alloc.proto @@ -4,4 +4,5 @@ option java_package = "ru.yandex.kikimr.proto"; message TAllocatorConfig { map<string, string> Param = 1; + bool EnableDefaultAllocator = 2; }; |