File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
ydb/core/memory_controller Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ ::NFormatPrivate::THumanReadableSize HumanReadableBytes(ui64 bytes) {
35
35
}
36
36
37
37
TString HumanReadableBytes (std::optional<ui64> bytes) {
38
- return bytes.has_value () ? TString (TStringBuilder () << HumanReadableBytes (bytes.value ())) : " none" ;
38
+ return bytes.has_value () ? TString (TStringBuilder () << HumanReadableBytes (bytes.value ())) : " none" ;
39
39
}
40
40
41
41
}
@@ -126,6 +126,14 @@ class TMemoryController : public TActorBootstrapped<TMemoryController> {
126
126
new NConsole::TEvConfigsDispatcher::TEvSetConfigSubscriptionRequest ({
127
127
NKikimrConsole::TConfigItem::MemoryControllerConfigItem}));
128
128
129
+ // When profiling memory it's convenient to set initial tcmalloc soft limit
130
+ #ifdef PROFILE_MEMORY_ALLOCATIONS
131
+ tcmalloc::MallocExtension::MemoryLimit limit;
132
+ limit.hard = false ;
133
+ limit.limit = GetSoftLimitBytes (Config, hardLimitBytes);
134
+ tcmalloc::MallocExtension::SetMemoryLimit (limit);
135
+ #endif
136
+
129
137
HandleWakeup (ctx);
130
138
131
139
LOG_INFO_S (ctx, NKikimrServices::MEMORY_CONTROLLER, " Bootstrapped with config " << Config.ShortDebugString ());
Original file line number Diff line number Diff line change 7
7
8
8
PEERDIR(
9
9
ydb/core/base
10
- ydb/library/actors/core
11
- ydb/library/services
12
- yql/essentials/minikql
13
10
ydb/core/cms/console
14
11
ydb/core/mon_alloc
15
12
ydb/core/node_whiteboard
16
13
ydb/core/tablet
14
+ ydb/library/actors/core
15
+ ydb/library/services
16
+ yql/essentials/minikql
17
+ yql/essentials/utils/memory_profiling
17
18
)
18
19
19
20
YQL_LAST_ABI_VERSION()
22
23
23
24
RECURSE_FOR_TESTS(
24
25
ut
25
- )
26
+ )
You can’t perform that action at this time.
0 commit comments