diff options
author | vmordovin <vmordovin@yandex-team.ru> | 2022-02-10 16:48:14 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:14 +0300 |
commit | 7c7f9bbcf57e15838d15afa94b31d8254b5d7776 (patch) | |
tree | 17073f853e6b3a1a95708e8aa0ea12fa42a717e7 /util/memory | |
parent | 466f96709329ff77ded50177df94d1893a226c00 (diff) | |
download | ydb-7c7f9bbcf57e15838d15afa94b31d8254b5d7776.tar.gz |
Restoring authorship annotation for <vmordovin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/memory')
-rw-r--r-- | util/memory/pool.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/util/memory/pool.h b/util/memory/pool.h index 13c8b6b9ed..dc4a4fdc02 100644 --- a/util/memory/pool.h +++ b/util/memory/pool.h @@ -307,8 +307,8 @@ private: }; template <typename TPool> -struct TPoolableBase { - inline void* operator new(size_t bytes, TPool& pool) { +struct TPoolableBase { + inline void* operator new(size_t bytes, TPool& pool) { return pool.Allocate(bytes); } @@ -326,9 +326,9 @@ private: inline void* operator new(size_t); // disallow default allocation }; -struct TPoolable: public TPoolableBase<TMemoryPool> { -}; - +struct TPoolable: public TPoolableBase<TMemoryPool> { +}; + class TMemoryPoolAllocator: public IAllocator { public: inline TMemoryPoolAllocator(TMemoryPool* pool) @@ -350,8 +350,8 @@ private: TMemoryPool* Pool_; }; -template <class T, class TPool> -class TPoolAllocBase { +template <class T, class TPool> +class TPoolAllocBase { public: using pointer = T*; using const_pointer = const T*; @@ -415,8 +415,8 @@ private: }; template <class T> -using TPoolAlloc = TPoolAllocBase<T, TMemoryPool>; - +using TPoolAlloc = TPoolAllocBase<T, TMemoryPool>; + // Any type since it is supposed to be rebound anyway. using TPoolAllocator = TPoolAlloc<int>; |