diff options
author | spacelord <spacelord@yandex-team.ru> | 2022-02-10 16:48:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:15 +0300 |
commit | a0c6d9ad0cf6b94c527a15da147eb24335281b6d (patch) | |
tree | b222e5ac2e2e98872661c51ccceee5da0d291e13 /util/memory | |
parent | 16747e4f77455cca4932df21eb76f12cb0a97a5c (diff) | |
download | ydb-a0c6d9ad0cf6b94c527a15da147eb24335281b6d.tar.gz |
Restoring authorship annotation for <spacelord@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/memory')
-rw-r--r-- | util/memory/blob.cpp | 18 | ||||
-rw-r--r-- | util/memory/blob.h | 6 | ||||
-rw-r--r-- | util/memory/pool.h | 20 | ||||
-rw-r--r-- | util/memory/segmented_string_pool.h | 6 | ||||
-rw-r--r-- | util/memory/segpool_alloc.h | 18 | ||||
-rw-r--r-- | util/memory/smallobj.h | 4 |
6 files changed, 36 insertions, 36 deletions
diff --git a/util/memory/blob.cpp b/util/memory/blob.cpp index 5dbc476c47..91da5cadca 100644 --- a/util/memory/blob.cpp +++ b/util/memory/blob.cpp @@ -16,7 +16,7 @@ template <class TCounter> class TDynamicBlobBase: public TBlob::TBase, public TRefCounted<TDynamicBlobBase<TCounter>, TCounter>, public TAdditionalStorage<TDynamicBlobBase<TCounter>> { - using TRefBase = TRefCounted<TDynamicBlobBase, TCounter>; + using TRefBase = TRefCounted<TDynamicBlobBase, TCounter>; public: inline TDynamicBlobBase() = default; @@ -42,7 +42,7 @@ public: template <class TCounter> class TBufferBlobBase: public TBlob::TBase, public TRefCounted<TBufferBlobBase<TCounter>, TCounter> { - using TRefBase = TRefCounted<TBufferBlobBase, TCounter>; + using TRefBase = TRefCounted<TBufferBlobBase, TCounter>; public: inline TBufferBlobBase(TBuffer& buf) { @@ -69,7 +69,7 @@ private: template <class TCounter> class TStringBlobBase: public TBlob::TBase, public TRefCounted<TStringBlobBase<TCounter>, TCounter> { - using TRefBase = TRefCounted<TStringBlobBase, TCounter>; + using TRefBase = TRefCounted<TStringBlobBase, TCounter>; public: inline TStringBlobBase(const TString& s) @@ -102,7 +102,7 @@ private: template <class TCounter> class TMappedBlobBase: public TBlob::TBase, public TRefCounted<TMappedBlobBase<TCounter>, TCounter> { - using TRefBase = TRefCounted<TMappedBlobBase<TCounter>, TCounter>; + using TRefBase = TRefCounted<TMappedBlobBase<TCounter>, TCounter>; public: inline TMappedBlobBase(const TMemoryMap& map, ui64 offset, size_t len, EMappingMode mode) @@ -171,7 +171,7 @@ TBlob TBlob::DeepCopy() const { template <class TCounter> static inline TBlob CopyConstruct(const void* data, size_t len) { - using Base = TDynamicBlobBase<TCounter>; + using Base = TDynamicBlobBase<TCounter>; THolder<Base> base(new (len) Base); Y_ASSERT(base->Length() == len); @@ -198,7 +198,7 @@ TBlob TBlob::NoCopy(const void* data, size_t length) { template <class TCounter> static inline TBlob ConstructFromMap(const TMemoryMap& map, ui64 offset, size_t length, EMappingMode mode) { - using TBase = TMappedBlobBase<TCounter>; + using TBase = TMappedBlobBase<TCounter>; THolder<TBase> base(new TBase(map, offset, length, mode)); TBlob ret(base->Data(), base->Length(), base.Get()); Y_UNUSED(base.Release()); @@ -302,7 +302,7 @@ TBlob TBlob::FromMemoryMap(const TMemoryMap& map, ui64 offset, size_t length) { template <class TCounter> static inline TBlob ReadFromFile(const TFile& file, ui64 offset, size_t length) { - using TBase = TDynamicBlobBase<TCounter>; + using TBase = TDynamicBlobBase<TCounter>; THolder<TBase> base(new (length) TBase); Y_ASSERT(base->Length() == length); @@ -352,7 +352,7 @@ TBlob TBlob::FromFileContent(const TFile& file, ui64 offset, size_t length) { template <class TCounter> static inline TBlob ConstructFromBuffer(TBuffer& in) { - using TBase = TBufferBlobBase<TCounter>; + using TBase = TBufferBlobBase<TCounter>; THolder<TBase> base(new TBase(in)); TBlob ret(base->Buffer().Data(), base->Buffer().Size(), base.Get()); @@ -392,7 +392,7 @@ TBlob TBlob::FromBuffer(TBuffer& in) { template <class TCounter, class S> TBlob ConstructFromString(S&& s) { - using TBase = TStringBlobBase<TCounter>; + using TBase = TStringBlobBase<TCounter>; auto base = MakeHolder<TBase>(std::forward<S>(s)); TBlob ret(base->String().data(), base->String().size(), base.Get()); diff --git a/util/memory/blob.h b/util/memory/blob.h index 9e031f2c88..20c02a68df 100644 --- a/util/memory/blob.h +++ b/util/memory/blob.h @@ -56,9 +56,9 @@ private: public: using value_type = ui8; - using const_reference = const value_type&; - using const_pointer = const value_type*; - using const_iterator = const_pointer; + using const_reference = const value_type&; + using const_pointer = const value_type*; + using const_iterator = const_pointer; /** * Constructs a null blob (data array points to nullptr). diff --git a/util/memory/pool.h b/util/memory/pool.h index 739f861d8f..13c8b6b9ed 100644 --- a/util/memory/pool.h +++ b/util/memory/pool.h @@ -25,7 +25,7 @@ */ class TMemoryPool { private: - using TBlock = IAllocator::TBlock; + using TBlock = IAllocator::TBlock; class TChunk: public TIntrusiveListItem<TChunk> { public: @@ -95,7 +95,7 @@ private: size_t Left_; }; - using TChunkList = TIntrusiveList<TChunk>; + using TChunkList = TIntrusiveList<TChunk>; public: class IGrowPolicy { @@ -353,13 +353,13 @@ private: template <class T, class TPool> class TPoolAllocBase { public: - using pointer = T*; - using const_pointer = const T*; - using reference = T&; - using const_reference = const T&; - using size_type = size_t; - using difference_type = ptrdiff_t; - using value_type = T; + using pointer = T*; + using const_pointer = const T*; + using reference = T&; + using const_reference = const T&; + using size_type = size_t; + using difference_type = ptrdiff_t; + using value_type = T; inline TPoolAllocBase(TPool* pool) : Pool_(pool) @@ -381,7 +381,7 @@ public: template <class T1> struct rebind { - using other = TPoolAllocBase<T1, TPool>; + using other = TPoolAllocBase<T1, TPool>; }; inline size_type max_size() const noexcept { diff --git a/util/memory/segmented_string_pool.h b/util/memory/segmented_string_pool.h index 98428fa991..a40aa408f5 100644 --- a/util/memory/segmented_string_pool.h +++ b/util/memory/segmented_string_pool.h @@ -36,8 +36,8 @@ protected: } }; using seg_container = TVector<seg_inf>; - using seg_iterator = typename seg_container::iterator; - using seg_const_iterator = typename seg_container::const_iterator; + using seg_iterator = typename seg_container::iterator; + using seg_const_iterator = typename seg_container::const_iterator; const size_t segment_size; // default size of a memory chunk in sizeof(T)-units size_t last_free; // size of free memory in chunk in sizeof(T)-units size_t last_ins_size; // size of memory used in chunk by the last append() in bytes @@ -148,7 +148,7 @@ public: class segmented_string_pool: public segmented_pool<char> { private: - using _Base = segmented_pool<char>; + using _Base = segmented_pool<char>; public: segmented_string_pool() diff --git a/util/memory/segpool_alloc.h b/util/memory/segpool_alloc.h index dfe3682939..1a83b7a543 100644 --- a/util/memory/segpool_alloc.h +++ b/util/memory/segpool_alloc.h @@ -30,15 +30,15 @@ template <class _Tp> struct segpool_alloc { - using pool_type = segmented_pool<char>; + using pool_type = segmented_pool<char>; pool_type* pool; - using pointer = _Tp*; - using const_pointer = const _Tp*; - using reference = _Tp&; - using const_reference = const _Tp&; - using size_type = size_t; - using difference_type = ptrdiff_t; - using value_type = _Tp; + using pointer = _Tp*; + using const_pointer = const _Tp*; + using reference = _Tp&; + using const_reference = const _Tp&; + using size_type = size_t; + using difference_type = ptrdiff_t; + using value_type = _Tp; #ifndef NDEBUG ui64 pool_count, malloc_count, pool_free_count, malloc_free_count; #endif @@ -90,7 +90,7 @@ struct segpool_alloc { } template <class _Tp1> struct rebind { - using other = segpool_alloc<_Tp1>; + using other = segpool_alloc<_Tp1>; }; size_type max_size() const { return size_type(-1) / sizeof(_Tp); diff --git a/util/memory/smallobj.h b/util/memory/smallobj.h index 25889e8070..63de666bae 100644 --- a/util/memory/smallobj.h +++ b/util/memory/smallobj.h @@ -30,7 +30,7 @@ class TFixedSizeAllocator { }; public: - using IGrowPolicy = TMemoryPool::IGrowPolicy; + using IGrowPolicy = TMemoryPool::IGrowPolicy; TFixedSizeAllocator(size_t allocSize, IAllocator* alloc) : TFixedSizeAllocator(allocSize, alignof(TAlloc), TMemoryPool::TExpGrow::Instance(), alloc) @@ -80,7 +80,7 @@ private: template <class T> class TSmallObjAllocator { public: - using IGrowPolicy = TFixedSizeAllocator::IGrowPolicy; + using IGrowPolicy = TFixedSizeAllocator::IGrowPolicy; inline TSmallObjAllocator(IAllocator* alloc) : Alloc_(sizeof(T), alignof(T), alloc) |