Skip to content

Commit 5c9045c

Browse files
authored
Allow to enable default allocator via config on start (#14372)
1 parent 0a47e49 commit 5c9045c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ydb/core/driver_lib/run/run.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,11 @@ void TKikimrRunner::InitializeAllocator(const TKikimrRunConfig& runConfig) {
10571057
for (const auto& a : allocConfig.GetParam()) {
10581058
NMalloc::MallocInfo().SetParam(a.first.c_str(), a.second.c_str());
10591059
}
1060+
#if defined(ALLOW_DEFAULT_ALLOCATOR)
1061+
if (allocConfig.GetEnableDefaultAllocator()) {
1062+
NKikimr::UseDefaultAllocator();
1063+
}
1064+
#endif
10601065
}
10611066

10621067
void TKikimrRunner::InitializeAppData(const TKikimrRunConfig& runConfig)

ydb/core/protos/alloc.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ option java_package = "ru.yandex.kikimr.proto";
44

55
message TAllocatorConfig {
66
map<string, string> Param = 1;
7+
bool EnableDefaultAllocator = 2;
78
};

0 commit comments

Comments
 (0)