summaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/memory
diff options
context:
space:
mode:
authorermolovd <[email protected]>2022-02-10 16:47:53 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:47:53 +0300
commit2a4a975b112fa0fa138abc7457fe67e0e1e7fd02 (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/yt/memory
parentb91bcef7c99a119b0846479ef71bfab4beec72ca (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/yt/memory')
-rw-r--r--library/cpp/yt/memory/new-inl.h24
-rw-r--r--library/cpp/yt/memory/ref-inl.h4
-rw-r--r--library/cpp/yt/memory/ref.cpp8
-rw-r--r--library/cpp/yt/memory/ref.h4
-rw-r--r--library/cpp/yt/memory/unittests/ya.make6
5 files changed, 23 insertions, 23 deletions
diff --git a/library/cpp/yt/memory/new-inl.h b/library/cpp/yt/memory/new-inl.h
index 63ff4ba97b0..0a848185167 100644
--- a/library/cpp/yt/memory/new-inl.h
+++ b/library/cpp/yt/memory/new-inl.h
@@ -92,17 +92,17 @@ struct TRefCountedWrapperWithCookie final
namespace NDetail {
-Y_FORCE_INLINE void* AllignedMalloc(size_t size, size_t allignment)
-{
-#ifdef _win_
- return ::_aligned_malloc(size, allignment);
-#else
- void* ptr = nullptr;
- ::posix_memalign(&ptr, allignment, size);
- return ptr;
-#endif
-}
-
+Y_FORCE_INLINE void* AllignedMalloc(size_t size, size_t allignment)
+{
+#ifdef _win_
+ return ::_aligned_malloc(size, allignment);
+#else
+ void* ptr = nullptr;
+ ::posix_memalign(&ptr, allignment, size);
+ return ptr;
+#endif
+}
+
template <class... Args>
Y_FORCE_INLINE void CustomInitialize(Args... args)
{
@@ -189,7 +189,7 @@ void* AllocateConstSizeAligned()
if (Alignment <= 16) {
return NYTAlloc::AllocateConstSize<Size>();
} else {
- return AllignedMalloc(Size, Alignment);
+ return AllignedMalloc(Size, Alignment);
}
}
diff --git a/library/cpp/yt/memory/ref-inl.h b/library/cpp/yt/memory/ref-inl.h
index 2ef0179b697..79be8356c53 100644
--- a/library/cpp/yt/memory/ref-inl.h
+++ b/library/cpp/yt/memory/ref-inl.h
@@ -10,8 +10,8 @@ namespace NYT {
namespace NDetail {
-extern const char EmptyRefData[];
-extern char MutableEmptyRefData[];
+extern const char EmptyRefData[];
+extern char MutableEmptyRefData[];
} // namespace NDetail
diff --git a/library/cpp/yt/memory/ref.cpp b/library/cpp/yt/memory/ref.cpp
index 9dcdb46a7e0..e8ff42e9760 100644
--- a/library/cpp/yt/memory/ref.cpp
+++ b/library/cpp/yt/memory/ref.cpp
@@ -11,10 +11,10 @@ namespace NYT {
namespace NDetail {
-// N.B. We would prefer these arrays to be zero sized
-// but zero sized arrays are not supported in MSVC.
-const char EmptyRefData[1] = {0};
-char MutableEmptyRefData[1] = {0};
+// N.B. We would prefer these arrays to be zero sized
+// but zero sized arrays are not supported in MSVC.
+const char EmptyRefData[1] = {0};
+char MutableEmptyRefData[1] = {0};
} // namespace NDetail
diff --git a/library/cpp/yt/memory/ref.h b/library/cpp/yt/memory/ref.h
index da9c8394b04..73d19d9013e 100644
--- a/library/cpp/yt/memory/ref.h
+++ b/library/cpp/yt/memory/ref.h
@@ -59,8 +59,8 @@ class TMutableRef
{
public:
//! Creates a null TMutableRef.
- //! Note empty TMutableRef is not the same as null TMutableRef.
- //! `operator bool` can be used to check if ref is nonnull.
+ //! Note empty TMutableRef is not the same as null TMutableRef.
+ //! `operator bool` can be used to check if ref is nonnull.
TMutableRef() = default;
//! Creates a TMutableRef for a given block of memory.
diff --git a/library/cpp/yt/memory/unittests/ya.make b/library/cpp/yt/memory/unittests/ya.make
index 16b29a729fa..f09ad7d0c93 100644
--- a/library/cpp/yt/memory/unittests/ya.make
+++ b/library/cpp/yt/memory/unittests/ya.make
@@ -2,9 +2,9 @@ GTEST(unittester-library-memory)
OWNER(g:yt)
-IF (NOT OS_WINDOWS)
- ALLOCATOR(YT)
-ENDIF()
+IF (NOT OS_WINDOWS)
+ ALLOCATOR(YT)
+ENDIF()
SRCS(
intrusive_ptr_ut.cpp