|
1 | 1 | #include "memory_controller.h" |
2 | 2 | #include "memory_controller_config.h" |
3 | 3 | #include "memtable_collection.h" |
4 | | -#include <util/stream/format.h> |
| 4 | + |
5 | 5 | #include <ydb/core/base/counters.h> |
6 | 6 | #include <ydb/core/base/localdb.h> |
7 | 7 | #include <ydb/core/base/memory_controller_iface.h> |
|
11 | 11 | #include <ydb/core/node_whiteboard/node_whiteboard.h> |
12 | 12 | #include <ydb/core/protos/memory_controller_config.pb.h> |
13 | 13 | #include <ydb/core/protos/memory_stats.pb.h> |
14 | | -#include <ydb/core/tablet/resource_broker.h> |
15 | 14 | #include <ydb/core/tablet_flat/shared_sausagecache.h> |
| 15 | +#include <ydb/core/tablet/resource_broker.h> |
16 | 16 | #include <ydb/library/actors/core/actor_bootstrapped.h> |
17 | 17 | #include <ydb/library/actors/core/log.h> |
18 | 18 | #include <ydb/library/actors/core/process_stats.h> |
19 | 19 | #include <ydb/library/services/services.pb.h> |
20 | 20 | #include <yql/essentials/minikql/aligned_page_pool.h> |
| 21 | +#include <yql/essentials/public/udf/arrow/memory_pool.h> |
| 22 | + |
21 | 23 | #include <contrib/libs/apache/arrow/cpp/src/arrow/type.h> |
22 | 24 | #include <contrib/libs/apache/arrow/cpp/src/arrow/memory_pool.h> |
23 | | -#include <yql/essentials/public/udf/arrow/memory_pool.h> |
| 25 | + |
| 26 | +#include <util/stream/format.h> |
| 27 | + |
| 28 | +#include <tcmalloc/malloc_extension.h> |
24 | 29 |
|
25 | 30 | namespace NKikimr::NMemory { |
26 | 31 |
|
@@ -128,6 +133,10 @@ class TMemoryController : public TActorBootstrapped<TMemoryController> { |
128 | 133 |
|
129 | 134 | // When profiling memory it's convenient to set initial tcmalloc soft limit |
130 | 135 | #ifdef PROFILE_MEMORY_ALLOCATIONS |
| 136 | + auto processMemoryInfo = ProcessMemoryInfoProvider->Get(); |
| 137 | + bool hasMemTotalHardLimit = false; |
| 138 | + ui64 hardLimitBytes = GetHardLimitBytes(Config, processMemoryInfo, hasMemTotalHardLimit); |
| 139 | + |
131 | 140 | tcmalloc::MallocExtension::MemoryLimit limit; |
132 | 141 | limit.hard = false; |
133 | 142 | limit.limit = GetSoftLimitBytes(Config, hardLimitBytes); |
|
0 commit comments