diff --git a/.github/workflows/reusable_basic.yml b/.github/workflows/reusable_basic.yml index 7170ec418f..5a6756f2ca 100644 --- a/.github/workflows/reusable_basic.yml +++ b/.github/workflows/reusable_basic.yml @@ -17,7 +17,7 @@ jobs: name: Ubuntu strategy: matrix: - os: ['ubuntu-20.04', 'ubuntu-22.04'] + os: ['ubuntu-22.04', 'ubuntu-24.04'] build_type: [Debug, Release] compiler: [{c: gcc, cxx: g++}] shared_library: ['OFF'] @@ -27,15 +27,6 @@ jobs: disable_hwloc: ['OFF'] link_hwloc_statically: ['OFF'] include: - - os: 'ubuntu-20.04' - build_type: Release - compiler: {c: gcc-7, cxx: g++-7} - shared_library: 'OFF' - level_zero_provider: 'ON' - cuda_provider: 'ON' - install_tbb: 'ON' - disable_hwloc: 'OFF' - link_hwloc_statically: 'OFF' - os: 'ubuntu-22.04' build_type: Release compiler: {c: clang, cxx: clang++} diff --git a/.github/workflows/reusable_compatibility.yml b/.github/workflows/reusable_compatibility.yml index fbd17a2f43..29597ac18f 100644 --- a/.github/workflows/reusable_compatibility.yml +++ b/.github/workflows/reusable_compatibility.yml @@ -97,7 +97,6 @@ jobs: -DUMF_FORMAT_CODE_STYLE=OFF -DUMF_DEVELOPER_MODE=ON -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON - -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON -DUMF_TESTS_FAIL_ON_SKIP=ON - name: Build latest UMF @@ -197,7 +196,6 @@ jobs: -DUMF_FORMAT_CODE_STYLE=OFF -DUMF_DEVELOPER_MODE=ON -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON - -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON -DUMF_TESTS_FAIL_ON_SKIP=ON - name: Build latest UMF diff --git a/.github/workflows/reusable_fast.yml b/.github/workflows/reusable_fast.yml index 5166f2b963..90a8f023fb 100644 --- a/.github/workflows/reusable_fast.yml +++ b/.github/workflows/reusable_fast.yml @@ -43,8 +43,8 @@ jobs: build_tests: 'ON' extra_build_options: '-DCMAKE_BUILD_TYPE=Release' simple_cmake: 'ON' - # simplest CMake ubuntu-20.04 - - os: ubuntu-20.04 + # simplest CMake ubuntu-22.04 + - os: ubuntu-22.04 build_tests: 'ON' extra_build_options: '-DCMAKE_BUILD_TYPE=Release' simple_cmake: 'ON' @@ -69,19 +69,12 @@ jobs: run: vcpkg install shell: pwsh # Specifies PowerShell as the shell for running the script. - - name: Install dependencies (ubuntu-latest) - if: matrix.os == 'ubuntu-latest' + - name: Install dependencies + if: matrix.os != 'windows-latest' run: | sudo apt-get update sudo apt-get install -y cmake libhwloc-dev libnuma-dev libtbb-dev - - name: Install dependencies (ubuntu-20.04) - if: matrix.os == 'ubuntu-20.04' - run: | - sudo apt-get update - sudo apt-get install -y cmake libnuma-dev libtbb-dev - .github/scripts/install_hwloc.sh # install hwloc-2.3.0 instead of hwloc-2.1.0 present in the OS package - - name: Configure CMake if: matrix.simple_cmake == 'OFF' run: > diff --git a/CMakeLists.txt b/CMakeLists.txt index 71d630fa57..ec10a0c4b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -283,7 +283,8 @@ else() message(STATUS "hwloc CMAKE_GENERATOR: ${CMAKE_GENERATOR}") - if(CMAKE_GENERATOR STREQUAL "Ninja") + if(CMAKE_GENERATOR STREQUAL "Ninja" OR CMAKE_GENERATOR STREQUAL + "Unix Makefiles") add_custom_command( COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${hwloc_targ_BINARY_DIR} -B build @@ -408,7 +409,7 @@ if(UMF_BUILD_LEVEL_ZERO_PROVIDER AND (NOT UMF_LEVEL_ZERO_INCLUDE_DIR)) include(FetchContent) set(LEVEL_ZERO_LOADER_REPO "https://github.com/oneapi-src/level-zero.git") - set(LEVEL_ZERO_LOADER_TAG v1.19.2) + set(LEVEL_ZERO_LOADER_TAG v1.20.2) message( STATUS diff --git a/benchmark/benchmark.cpp b/benchmark/benchmark.cpp index 94d77dabd6..60636a559f 100644 --- a/benchmark/benchmark.cpp +++ b/benchmark/benchmark.cpp @@ -35,6 +35,10 @@ static void multithreaded(benchmark::internal::Benchmark *benchmark) { benchmark->Threads(1); } +static void singlethreaded(benchmark::internal::Benchmark *benchmark) { + benchmark->Threads(1); +} + static void default_multiple_alloc_fix_size(benchmark::internal::Benchmark *benchmark) { benchmark->Args({10000, 1, 4096}); @@ -68,7 +72,8 @@ UMF_BENCHMARK_TEMPLATE_DEFINE(multiple_malloc_free_benchmark, proxy_pool, UMF_BENCHMARK_REGISTER_F(multiple_malloc_free_benchmark, proxy_pool) ->Apply(&default_multiple_alloc_fix_size) // reduce iterations, as this benchmark is slower than others - ->Iterations(50000); + ->Iterations(50000) + ->Apply(&singlethreaded); UMF_BENCHMARK_TEMPLATE_DEFINE(multiple_malloc_free_benchmark, os_provider, fixed_alloc_size, @@ -76,7 +81,8 @@ UMF_BENCHMARK_TEMPLATE_DEFINE(multiple_malloc_free_benchmark, os_provider, UMF_BENCHMARK_REGISTER_F(multiple_malloc_free_benchmark, os_provider) ->Apply(&default_multiple_alloc_fix_size) // reduce iterations, as this benchmark is slower than others - ->Iterations(50000); + ->Iterations(50000) + ->Apply(&singlethreaded); UMF_BENCHMARK_TEMPLATE_DEFINE(multiple_malloc_free_benchmark, disjoint_pool_fix, fixed_alloc_size, @@ -89,8 +95,9 @@ UMF_BENCHMARK_TEMPLATE_DEFINE(multiple_malloc_free_benchmark, disjoint_pool_uniform, uniform_alloc_size, pool_allocator>); UMF_BENCHMARK_REGISTER_F(multiple_malloc_free_benchmark, disjoint_pool_uniform) - ->Apply(&default_multiple_alloc_uniform_size); -// TODO: enable + ->Apply(&default_multiple_alloc_uniform_size) + ->Apply(&singlethreaded); +// TODO: change to multithreaded //->Apply(&multithreaded); #ifdef UMF_POOL_JEMALLOC_ENABLED diff --git a/examples/ipc_level_zero/CMakeLists.txt b/examples/ipc_level_zero/CMakeLists.txt index d672d3e92e..2aa391d655 100644 --- a/examples/ipc_level_zero/CMakeLists.txt +++ b/examples/ipc_level_zero/CMakeLists.txt @@ -24,7 +24,7 @@ endif() include(FetchContent) set(LEVEL_ZERO_LOADER_REPO "https://github.com/oneapi-src/level-zero.git") -set(LEVEL_ZERO_LOADER_TAG v1.19.2) +set(LEVEL_ZERO_LOADER_TAG v1.20.2) message( STATUS diff --git a/examples/level_zero_shared_memory/CMakeLists.txt b/examples/level_zero_shared_memory/CMakeLists.txt index f4aaf09e97..b7c990145b 100644 --- a/examples/level_zero_shared_memory/CMakeLists.txt +++ b/examples/level_zero_shared_memory/CMakeLists.txt @@ -24,7 +24,7 @@ endif() include(FetchContent) set(LEVEL_ZERO_LOADER_REPO "https://github.com/oneapi-src/level-zero.git") -set(LEVEL_ZERO_LOADER_TAG v1.19.2) +set(LEVEL_ZERO_LOADER_TAG v1.20.2) message( STATUS diff --git a/src/coarse/coarse.c b/src/coarse/coarse.c index 956e54857e..19798466e1 100644 --- a/src/coarse/coarse.c +++ b/src/coarse/coarse.c @@ -1170,10 +1170,13 @@ umf_result_t coarse_free(coarse_t *coarse, void *ptr, size_t bytes) { } block_t *block = get_node_block(node); - assert(block->used); + if (!block->used) { + LOG_ERR("double free"); + utils_mutex_unlock(&coarse->lock); + return UMF_RESULT_ERROR_INVALID_ARGUMENT; + } if (bytes > 0 && bytes != block->size) { - // wrong size of allocation LOG_ERR("wrong size of allocation"); utils_mutex_unlock(&coarse->lock); return UMF_RESULT_ERROR_INVALID_ARGUMENT; diff --git a/src/pool/pool_disjoint.c b/src/pool/pool_disjoint.c index 7b03ea79eb..9adb1a7a4f 100644 --- a/src/pool/pool_disjoint.c +++ b/src/pool/pool_disjoint.c @@ -752,8 +752,10 @@ void *disjoint_pool_aligned_malloc(void *pool, size_t size, size_t alignment) { } void *aligned_ptr = (void *)ALIGN_UP_SAFE((size_t)ptr, alignment); - VALGRIND_DO_MEMPOOL_ALLOC(disjoint_pool, aligned_ptr, size); - utils_annotate_memory_undefined(aligned_ptr, size); + size_t diff = (ptrdiff_t)aligned_ptr - (ptrdiff_t)ptr; + size_t real_size = bucket->size - diff; + VALGRIND_DO_MEMPOOL_ALLOC(disjoint_pool, aligned_ptr, real_size); + utils_annotate_memory_undefined(aligned_ptr, real_size); utils_mutex_unlock(&bucket->bucket_lock); @@ -767,11 +769,34 @@ void *disjoint_pool_aligned_malloc(void *pool, size_t size, size_t alignment) { } size_t disjoint_pool_malloc_usable_size(void *pool, void *ptr) { - (void)pool; - (void)ptr; + disjoint_pool_t *disjoint_pool = (disjoint_pool_t *)pool; + if (ptr == NULL) { + return 0; + } - // Not supported - return 0; + // check if given pointer is allocated inside any Disjoint Pool slab + slab_t *slab = + (slab_t *)critnib_find_le(disjoint_pool->known_slabs, (uintptr_t)ptr); + if (slab == NULL || ptr >= slab_get_end(slab)) { + // memory comes directly from the provider + umf_alloc_info_t allocInfo = {NULL, 0, NULL}; + umf_result_t ret = umfMemoryTrackerGetAllocInfo(ptr, &allocInfo); + if (ret != UMF_RESULT_SUCCESS) { + return 0; + } + + return allocInfo.baseSize; + } + // Get the unaligned pointer + // NOTE: the base pointer slab->mem_ptr needn't to be aligned to bucket size + size_t chunk_idx = + (((uintptr_t)ptr - (uintptr_t)slab->mem_ptr) / slab->bucket->size); + void *unaligned_ptr = + (void *)((uintptr_t)slab->mem_ptr + chunk_idx * slab->bucket->size); + + ptrdiff_t diff = (ptrdiff_t)ptr - (ptrdiff_t)unaligned_ptr; + + return slab->bucket->size - diff; } umf_result_t disjoint_pool_free(void *pool, void *ptr) { diff --git a/src/provider/provider_tracking.c b/src/provider/provider_tracking.c index 62145d5d77..f9a98e87fe 100644 --- a/src/provider/provider_tracking.c +++ b/src/provider/provider_tracking.c @@ -291,26 +291,26 @@ static umf_result_t trackingAllocationMerge(void *hProvider, void *lowPtr, tracker_alloc_info_t *lowValue = (tracker_alloc_info_t *)critnib_get( provider->hTracker->alloc_segments_map, (uintptr_t)lowPtr); if (!lowValue) { - LOG_ERR("no left value"); + LOG_FATAL("no left value"); ret = UMF_RESULT_ERROR_INVALID_ARGUMENT; - goto err; + goto err_assert; } tracker_alloc_info_t *highValue = (tracker_alloc_info_t *)critnib_get( provider->hTracker->alloc_segments_map, (uintptr_t)highPtr); if (!highValue) { - LOG_ERR("no right value"); + LOG_FATAL("no right value"); ret = UMF_RESULT_ERROR_INVALID_ARGUMENT; - goto err; + goto err_assert; } if (lowValue->pool != highValue->pool) { - LOG_ERR("pool mismatch"); + LOG_FATAL("pool mismatch"); ret = UMF_RESULT_ERROR_INVALID_ARGUMENT; - goto err; + goto err_assert; } if (lowValue->size + highValue->size != totalSize) { - LOG_ERR("lowValue->size + highValue->size != totalSize"); + LOG_FATAL("lowValue->size + highValue->size != totalSize"); ret = UMF_RESULT_ERROR_INVALID_ARGUMENT; - goto err; + goto err_assert; } ret = umfMemoryProviderAllocationMerge(provider->hUpstream, lowPtr, highPtr, @@ -342,7 +342,7 @@ static umf_result_t trackingAllocationMerge(void *hProvider, void *lowPtr, return UMF_RESULT_SUCCESS; -err: +err_assert: assert(0); not_merged: diff --git a/test/coarse_lib.cpp b/test/coarse_lib.cpp index a1aec224ae..c2e1f9c856 100644 --- a/test/coarse_lib.cpp +++ b/test/coarse_lib.cpp @@ -160,6 +160,13 @@ TEST_P(CoarseWithMemoryStrategyTest, coarseTest_basic_provider) { ASSERT_EQ(coarse_get_stats(ch).alloc_size, alloc_size); ASSERT_EQ(coarse_get_stats(ch).num_all_blocks, 1); + // test double free + umf_result = coarse_free(ch, ptr, 2 * MB); + ASSERT_EQ(umf_result, UMF_RESULT_ERROR_INVALID_ARGUMENT); + ASSERT_EQ(coarse_get_stats(ch).used_size, 0); + ASSERT_EQ(coarse_get_stats(ch).alloc_size, alloc_size); + ASSERT_EQ(coarse_get_stats(ch).num_all_blocks, 1); + coarse_delete(ch); umfMemoryProviderDestroy(malloc_memory_provider); } @@ -202,6 +209,13 @@ TEST_P(CoarseWithMemoryStrategyTest, coarseTest_basic_fixed_memory) { ASSERT_EQ(coarse_get_stats(ch).alloc_size, buff_size); ASSERT_EQ(coarse_get_stats(ch).num_all_blocks, 1); + // test double free + umf_result = coarse_free(ch, ptr, 2 * MB); + ASSERT_EQ(umf_result, UMF_RESULT_ERROR_INVALID_ARGUMENT); + ASSERT_EQ(coarse_get_stats(ch).used_size, 0); + ASSERT_EQ(coarse_get_stats(ch).alloc_size, buff_size); + ASSERT_EQ(coarse_get_stats(ch).num_all_blocks, 1); + coarse_delete(ch); } diff --git a/test/common/pool.hpp b/test/common/pool.hpp index 9a5739085a..a5b4afc15b 100644 --- a/test/common/pool.hpp +++ b/test/common/pool.hpp @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -19,6 +19,7 @@ #include #include +#include #include "base.hpp" #include "cpp_helpers.hpp" @@ -150,6 +151,49 @@ struct malloc_pool : public pool_base_t { umf_memory_pool_ops_t MALLOC_POOL_OPS = umf::poolMakeCOps(); +static constexpr size_t DEFAULT_DISJOINT_SLAB_MIN_SIZE = 4096; +static constexpr size_t DEFAULT_DISJOINT_MAX_POOLABLE_SIZE = 4096; +static constexpr size_t DEFAULT_DISJOINT_CAPACITY = 4; +static constexpr size_t DEFAULT_DISJOINT_MIN_BUCKET_SIZE = 64; + +inline void *defaultDisjointPoolConfig() { + umf_disjoint_pool_params_handle_t config = nullptr; + umf_result_t res = umfDisjointPoolParamsCreate(&config); + if (res != UMF_RESULT_SUCCESS) { + throw std::runtime_error("Failed to create pool params"); + } + res = umfDisjointPoolParamsSetSlabMinSize(config, + DEFAULT_DISJOINT_SLAB_MIN_SIZE); + if (res != UMF_RESULT_SUCCESS) { + umfDisjointPoolParamsDestroy(config); + throw std::runtime_error("Failed to set slab min size"); + } + res = umfDisjointPoolParamsSetMaxPoolableSize( + config, DEFAULT_DISJOINT_MAX_POOLABLE_SIZE); + if (res != UMF_RESULT_SUCCESS) { + umfDisjointPoolParamsDestroy(config); + throw std::runtime_error("Failed to set max poolable size"); + } + res = umfDisjointPoolParamsSetCapacity(config, DEFAULT_DISJOINT_CAPACITY); + if (res != UMF_RESULT_SUCCESS) { + umfDisjointPoolParamsDestroy(config); + throw std::runtime_error("Failed to set capacity"); + } + res = umfDisjointPoolParamsSetMinBucketSize( + config, DEFAULT_DISJOINT_MIN_BUCKET_SIZE); + if (res != UMF_RESULT_SUCCESS) { + umfDisjointPoolParamsDestroy(config); + throw std::runtime_error("Failed to set min bucket size"); + } + + return config; +} + +inline umf_result_t defaultDisjointPoolConfigDestroy(void *config) { + return umfDisjointPoolParamsDestroy( + static_cast(config)); +} + } // namespace umf_test #endif /* UMF_TEST_POOL_HPP */ diff --git a/test/memoryPoolAPI.cpp b/test/memoryPoolAPI.cpp index e2455fe85e..a949b281f9 100644 --- a/test/memoryPoolAPI.cpp +++ b/test/memoryPoolAPI.cpp @@ -12,6 +12,7 @@ #include "test_helpers.h" #include +#include #include #ifdef UMF_PROXY_LIB_ENABLED @@ -295,12 +296,14 @@ TEST_F(tagTest, SetAndGetInvalidPool) { INSTANTIATE_TEST_SUITE_P( mallocPoolTest, umfPoolTest, - ::testing::Values(poolCreateExtParams{&MALLOC_POOL_OPS, nullptr, nullptr, - &UMF_NULL_PROVIDER_OPS, nullptr, - nullptr}, - poolCreateExtParams{umfProxyPoolOps(), nullptr, nullptr, - &BA_GLOBAL_PROVIDER_OPS, nullptr, - nullptr})); + ::testing::Values( + poolCreateExtParams{&MALLOC_POOL_OPS, nullptr, nullptr, + &UMF_NULL_PROVIDER_OPS, nullptr, nullptr}, + poolCreateExtParams{umfProxyPoolOps(), nullptr, nullptr, + &BA_GLOBAL_PROVIDER_OPS, nullptr, nullptr}, + poolCreateExtParams{umfDisjointPoolOps(), defaultDisjointPoolConfig, + defaultDisjointPoolConfigDestroy, + &BA_GLOBAL_PROVIDER_OPS, nullptr, nullptr})); INSTANTIATE_TEST_SUITE_P(mallocMultiPoolTest, umfMultiPoolTest, ::testing::Values(poolCreateExtParams{ diff --git a/test/poolFixtures.hpp b/test/poolFixtures.hpp index d9a5410c0d..6f18664f92 100644 --- a/test/poolFixtures.hpp +++ b/test/poolFixtures.hpp @@ -452,26 +452,45 @@ TEST_P(umfPoolTest, allocMaxSize) { } TEST_P(umfPoolTest, mallocUsableSize) { + [[maybe_unused]] auto pool_ops = std::get<0>(this->GetParam()); +#ifdef _WIN32 + if (pool_ops == &umf_test::MALLOC_POOL_OPS) { + GTEST_SKIP() + << "Windows Malloc Pool does not support umfPoolAlignedMalloc"; + } +#endif + if (!umf_test::isAlignedAllocSupported(pool.get())) { + GTEST_SKIP(); + } #ifdef __SANITIZE_ADDRESS__ - // Sanitizer replaces malloc_usable_size implementation with its own - GTEST_SKIP() - << "This test is invalid with AddressSanitizer instrumentation"; -#else + if (pool_ops == &umf_test::MALLOC_POOL_OPS) { + // Sanitizer replaces malloc_usable_size implementation with its own + GTEST_SKIP() + << "This test is invalid with AddressSanitizer instrumentation"; + } +#endif + for (size_t allocSize : + {32, 64, 1 << 6, 1 << 10, 1 << 13, 1 << 16, 1 << 19}) { + for (size_t alignment : {0, 1 << 6, 1 << 8, 1 << 12}) { + if (alignment >= allocSize) { + continue; + } + void *ptr = nullptr; + if (alignment == 0) { + ptr = umfPoolMalloc(pool.get(), allocSize); + } else { + ptr = umfPoolAlignedMalloc(pool.get(), allocSize, alignment); + } + ASSERT_NE(ptr, nullptr); + size_t result = umfPoolMallocUsableSize(pool.get(), ptr); + ASSERT_TRUE(result == 0 || result >= allocSize); - for (size_t allocSize : {32, 48, 1024, 8192}) { - char *ptr = static_cast(umfPoolMalloc(pool.get(), allocSize)); - ASSERT_NE(ptr, nullptr); - size_t result = umfPoolMallocUsableSize(pool.get(), ptr); - ASSERT_TRUE(result == 0 || result >= allocSize); + // Make sure we can write to this memory + memset(ptr, 123, result); - // Make sure we can write to this memory - for (size_t i = 0; i < result; i++) { - ptr[i] = 123; + umfPoolFree(pool.get(), ptr); } - - umfPoolFree(pool.get(), ptr); } -#endif } #endif /* UMF_TEST_POOL_FIXTURES_HPP */ diff --git a/test/pools/disjoint_pool.cpp b/test/pools/disjoint_pool.cpp index dad9601871..02f7698024 100644 --- a/test/pools/disjoint_pool.cpp +++ b/test/pools/disjoint_pool.cpp @@ -13,49 +13,6 @@ #include "provider_null.h" #include "provider_trace.h" -static constexpr size_t DEFAULT_DISJOINT_SLAB_MIN_SIZE = 4096; -static constexpr size_t DEFAULT_DISJOINT_MAX_POOLABLE_SIZE = 4096; -static constexpr size_t DEFAULT_DISJOINT_CAPACITY = 4; -static constexpr size_t DEFAULT_DISJOINT_MIN_BUCKET_SIZE = 64; - -void *defaultPoolConfig() { - umf_disjoint_pool_params_handle_t config = nullptr; - umf_result_t res = umfDisjointPoolParamsCreate(&config); - if (res != UMF_RESULT_SUCCESS) { - throw std::runtime_error("Failed to create pool params"); - } - res = umfDisjointPoolParamsSetSlabMinSize(config, - DEFAULT_DISJOINT_SLAB_MIN_SIZE); - if (res != UMF_RESULT_SUCCESS) { - umfDisjointPoolParamsDestroy(config); - throw std::runtime_error("Failed to set slab min size"); - } - res = umfDisjointPoolParamsSetMaxPoolableSize( - config, DEFAULT_DISJOINT_MAX_POOLABLE_SIZE); - if (res != UMF_RESULT_SUCCESS) { - umfDisjointPoolParamsDestroy(config); - throw std::runtime_error("Failed to set max poolable size"); - } - res = umfDisjointPoolParamsSetCapacity(config, DEFAULT_DISJOINT_CAPACITY); - if (res != UMF_RESULT_SUCCESS) { - umfDisjointPoolParamsDestroy(config); - throw std::runtime_error("Failed to set capacity"); - } - res = umfDisjointPoolParamsSetMinBucketSize( - config, DEFAULT_DISJOINT_MIN_BUCKET_SIZE); - if (res != UMF_RESULT_SUCCESS) { - umfDisjointPoolParamsDestroy(config); - throw std::runtime_error("Failed to set min bucket size"); - } - - return config; -} - -umf_result_t poolConfigDestroy(void *config) { - return umfDisjointPoolParamsDestroy( - static_cast(config)); -} - using umf_test::test; using namespace umf_test; @@ -92,7 +49,7 @@ TEST_F(test, internals) { provider_handle = providerUnique.get(); umf_disjoint_pool_params_handle_t params = - (umf_disjoint_pool_params_handle_t)defaultPoolConfig(); + (umf_disjoint_pool_params_handle_t)defaultDisjointPoolConfig(); // set to maximum tracing params->pool_trace = 3; params->max_poolable_size = 1024 * 1024; @@ -256,7 +213,7 @@ TEST_F(test, sharedLimits) { static constexpr size_t MaxSize = 4 * SlabMinSize; umf_disjoint_pool_params_handle_t params = - (umf_disjoint_pool_params_handle_t)defaultPoolConfig(); + (umf_disjoint_pool_params_handle_t)defaultDisjointPoolConfig(); umf_result_t ret = umfDisjointPoolParamsSetSlabMinSize(params, SlabMinSize); EXPECT_EQ(ret, UMF_RESULT_SUCCESS); @@ -373,22 +330,23 @@ TEST_F(test, disjointPoolInvalidBucketSize) { INSTANTIATE_TEST_SUITE_P(disjointPoolTests, umfPoolTest, ::testing::Values(poolCreateExtParams{ - umfDisjointPoolOps(), defaultPoolConfig, - poolConfigDestroy, &BA_GLOBAL_PROVIDER_OPS, - nullptr, nullptr})); + umfDisjointPoolOps(), defaultDisjointPoolConfig, + defaultDisjointPoolConfigDestroy, + &BA_GLOBAL_PROVIDER_OPS, nullptr, nullptr})); void *memProviderParams() { return (void *)&DEFAULT_DISJOINT_CAPACITY; } INSTANTIATE_TEST_SUITE_P( disjointPoolTests, umfMemTest, ::testing::Values(std::make_tuple( - poolCreateExtParams{umfDisjointPoolOps(), defaultPoolConfig, - poolConfigDestroy, &MOCK_OUT_OF_MEM_PROVIDER_OPS, - memProviderParams, nullptr}, + poolCreateExtParams{umfDisjointPoolOps(), defaultDisjointPoolConfig, + defaultDisjointPoolConfigDestroy, + &MOCK_OUT_OF_MEM_PROVIDER_OPS, memProviderParams, + nullptr}, static_cast(DEFAULT_DISJOINT_CAPACITY) / 2))); INSTANTIATE_TEST_SUITE_P(disjointMultiPoolTests, umfMultiPoolTest, ::testing::Values(poolCreateExtParams{ - umfDisjointPoolOps(), defaultPoolConfig, - poolConfigDestroy, &BA_GLOBAL_PROVIDER_OPS, - nullptr, nullptr})); + umfDisjointPoolOps(), defaultDisjointPoolConfig, + defaultDisjointPoolConfigDestroy, + &BA_GLOBAL_PROVIDER_OPS, nullptr, nullptr})); diff --git a/third_party/requirements.txt b/third_party/requirements.txt index 4b8244b3aa..467ea1e033 100644 --- a/third_party/requirements.txt +++ b/third_party/requirements.txt @@ -12,7 +12,7 @@ sphinxcontrib_devhelp==2.0.0 sphinxcontrib_htmlhelp==2.1.0 sphinxcontrib_serializinghtml==2.0.0 sphinxcontrib_qthelp==2.0.0 -breathe==4.35.0 +breathe==4.36.0 sphinx==8.1.3 sphinx_book_theme==1.1.3 # Spelling check in documentation