aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/memory/public.h
blob: 1d27782affafcb366feef664237590eece9aa5b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include "ref_counted.h"

namespace NYT {

////////////////////////////////////////////////////////////////////////////////

// TODO(babenko): consider increasing to 128 due to cache line pairing in L2 prefetcher.
constexpr size_t CacheLineSize = 64;

class TChunkedMemoryPool;

DECLARE_REFCOUNTED_STRUCT(IMemoryChunkProvider)
DECLARE_REFCOUNTED_STRUCT(ISimpleMemoryUsageTracker)
DECLARE_REFCOUNTED_STRUCT(TSharedRangeHolder)

using TMemoryTag = ui32;
constexpr TMemoryTag NullMemoryTag = 0;
constexpr TMemoryTag MaxMemoryTag = (1ULL << 22) - 1;

////////////////////////////////////////////////////////////////////////////////

} // namespace NYT