From 1d8c8ac8439323c1a3017900cc3fd4285cc813dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Zwoli=C5=84ski?= Date: Tue, 11 Feb 2025 16:36:49 +0000 Subject: [PATCH] refactor: use designated initializers for SmallBuffersParams initialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related-To: NEO-12287 Signed-off-by: Fabian ZwoliƄski --- .../source/utilities/buffer_pool_allocator.h | 18 ++++++------- .../utilities/buffer_pool_allocator_tests.cpp | 27 +++++++++---------- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/shared/source/utilities/buffer_pool_allocator.h b/shared/source/utilities/buffer_pool_allocator.h index 8e05c5a619..d612acda42 100644 --- a/shared/source/utilities/buffer_pool_allocator.h +++ b/shared/source/utilities/buffer_pool_allocator.h @@ -31,20 +31,18 @@ struct SmallBuffersParams { static SmallBuffersParams getDefaultParams() { return { - 2 * MemoryConstants::megaByte, // aggregatedSmallBuffersPoolSize - 1 * MemoryConstants::megaByte, // smallBufferThreshold - MemoryConstants::pageSize64k, // chunkAlignment - MemoryConstants::pageSize64k // startingOffset - }; + .aggregatedSmallBuffersPoolSize = 2 * MemoryConstants::megaByte, + .smallBufferThreshold = 1 * MemoryConstants::megaByte, + .chunkAlignment = MemoryConstants::pageSize64k, + .startingOffset = MemoryConstants::pageSize64k}; } static SmallBuffersParams getLargePagesParams() { return { - 16 * MemoryConstants::megaByte, // aggregatedSmallBuffersPoolSize - 2 * MemoryConstants::megaByte, // smallBufferThreshold - MemoryConstants::pageSize64k, // chunkAlignment - MemoryConstants::pageSize64k // startingOffset - }; + .aggregatedSmallBuffersPoolSize = 16 * MemoryConstants::megaByte, + .smallBufferThreshold = 2 * MemoryConstants::megaByte, + .chunkAlignment = MemoryConstants::pageSize64k, + .startingOffset = MemoryConstants::pageSize64k}; } static inline SmallBuffersParams getPreferredBufferPoolParams(const ProductHelper &productHelper); diff --git a/shared/test/unit_test/utilities/buffer_pool_allocator_tests.cpp b/shared/test/unit_test/utilities/buffer_pool_allocator_tests.cpp index f8cd7150eb..36f5357f04 100644 --- a/shared/test/unit_test/utilities/buffer_pool_allocator_tests.cpp +++ b/shared/test/unit_test/utilities/buffer_pool_allocator_tests.cpp @@ -30,11 +30,10 @@ struct DummyBuffersPool : public NEO::AbstractBuffersPool