diff --git a/docs/config/examples.rst b/docs/config/examples.rst index b5287d148..a09638da9 100644 --- a/docs/config/examples.rst +++ b/docs/config/examples.rst @@ -29,7 +29,7 @@ First, let's create a memory provider object for coarse-grained allocations. You have to include the `provider_os_memory.h`_ header with the OS Memory Provider API:: - #include "umf/providers/provider_os_memory.h" + #include Get a pointer to the OS memory provider operations struct:: @@ -74,7 +74,7 @@ Having created a memory ``provider``, you can create a Scalable Memory ``pool`` to be used for fine-grained allocations. You have to include the `pool_scalable.h`_ header with the Scalable Memory Pool API:: - #include "umf/pools/pool_scalable.h" + #include Use the default set of operations for the Scalable memory pool by retrieving an address of the default ops struct:: diff --git a/src/memory_provider.c b/src/memory_provider.c index 74aefddef..27f33f86f 100644 --- a/src/memory_provider.c +++ b/src/memory_provider.c @@ -12,13 +12,13 @@ #include #include +#include #include #include "base_alloc.h" #include "base_alloc_global.h" #include "libumf.h" #include "memory_provider_internal.h" -#include "umf/base.h" #include "utils_assert.h" static umf_result_t CTL_SUBTREE_HANDLER(by_handle_provider)( diff --git a/src/pool/pool_scalable.c b/src/pool/pool_scalable.c index f44c5cb1f..a234ef923 100644 --- a/src/pool/pool_scalable.c +++ b/src/pool/pool_scalable.c @@ -13,15 +13,15 @@ #include #include -#include -#include #include #include #include #include #include "base_alloc_global.h" +#include "ctl/ctl.h" #include "libumf.h" +#include "memory_pool_internal.h" #include "pool_scalable_internal.h" #include "utils_common.h" #include "utils_concurrency.h" diff --git a/src/provider/provider_os_memory.c b/src/provider/provider_os_memory.c index 1790c91af..2b3ca2534 100644 --- a/src/provider/provider_os_memory.c +++ b/src/provider/provider_os_memory.c @@ -6,7 +6,6 @@ */ #include -#include #include #include @@ -20,6 +19,7 @@ #include #include +#include "ctl/ctl.h" #include "utils_assert.h" // OS Memory Provider requires HWLOC #if defined(UMF_NO_HWLOC) diff --git a/src/utils/utils_log.c b/src/utils/utils_log.c index 2fd28fc2c..960ae4686 100644 --- a/src/utils/utils_log.c +++ b/src/utils/utils_log.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -26,7 +26,7 @@ #include #include -#include "umf.h" +#include #include "utils_assert.h" #include "utils_common.h" diff --git a/test/common/test_helpers.c b/test/common/test_helpers.c index d69ca3535..997ff77b2 100644 --- a/test/common/test_helpers.c +++ b/test/common/test_helpers.c @@ -8,11 +8,12 @@ #include #include +#include +#include + #include "pool_null.h" #include "pool_trace.h" #include "provider_null.h" -#include "umf/memory_pool.h" -#include "umf/memory_provider.h" #include "test_helpers.h" diff --git a/test/fuzz/utils.hpp b/test/fuzz/utils.hpp index 645353fb2..b8ff27112 100644 --- a/test/fuzz/utils.hpp +++ b/test/fuzz/utils.hpp @@ -1,18 +1,19 @@ -// Copyright (C) 2024 Intel Corporation +// Copyright (C) 2024-2025 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #ifndef UMF_TEST_FUZZ_UTILS_HPP #define UMF_TEST_FUZZ_UTILS_HPP -#include "umf/pools/pool_scalable.h" -#include "umf/providers/provider_os_memory.h" #include #include #include #include #include +#include +#include + namespace fuzz { enum FuzzerAPICall : uint8_t { diff --git a/test/malloc_compliance_tests.cpp b/test/malloc_compliance_tests.cpp index e59dc4f4e..b82828198 100644 --- a/test/malloc_compliance_tests.cpp +++ b/test/malloc_compliance_tests.cpp @@ -11,9 +11,10 @@ #include #include +#include + #include "malloc_compliance_tests.hpp" #include "test_helpers.h" -#include "umf/memory_pool.h" #include "base.hpp" using umf_test::test; diff --git a/test/malloc_compliance_tests.hpp b/test/malloc_compliance_tests.hpp index d76c2b945..00fed53ef 100644 --- a/test/malloc_compliance_tests.hpp +++ b/test/malloc_compliance_tests.hpp @@ -1,11 +1,11 @@ -// Copyright (C) 2023 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 #ifndef UMF_TEST_MALLOC_COMPLIANCE_TESTS_H #define UMF_TEST_MALLOC_COMPLIANCE_TESTS_H -#include "umf/memory_pool.h" +#include void malloc_compliance_test(umf_memory_pool_handle_t hPool); void calloc_compliance_test(umf_memory_pool_handle_t hPool); diff --git a/test/pools/jemalloc_coarse_devdax.cpp b/test/pools/jemalloc_coarse_devdax.cpp index 9ab31a101..703f1176b 100644 --- a/test/pools/jemalloc_coarse_devdax.cpp +++ b/test/pools/jemalloc_coarse_devdax.cpp @@ -2,8 +2,8 @@ // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include "umf/pools/pool_jemalloc.h" -#include "umf/providers/provider_devdax_memory.h" +#include +#include #include "pool_coarse.hpp" diff --git a/test/pools/jemalloc_coarse_file.cpp b/test/pools/jemalloc_coarse_file.cpp index a658e849f..bce595a2b 100644 --- a/test/pools/jemalloc_coarse_file.cpp +++ b/test/pools/jemalloc_coarse_file.cpp @@ -2,8 +2,8 @@ // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include "umf/pools/pool_jemalloc.h" -#include "umf/providers/provider_file_memory.h" +#include +#include #include "pool_coarse.hpp" diff --git a/test/pools/jemalloc_pool.cpp b/test/pools/jemalloc_pool.cpp index c0a17c641..a87940928 100644 --- a/test/pools/jemalloc_pool.cpp +++ b/test/pools/jemalloc_pool.cpp @@ -2,8 +2,8 @@ // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include "umf/pools/pool_jemalloc.h" -#include "umf/providers/provider_os_memory.h" +#include +#include #include "pool.hpp" #include "poolFixtures.hpp" diff --git a/test/pools/pool_base_alloc.cpp b/test/pools/pool_base_alloc.cpp index e1d69226d..49fb7bc28 100644 --- a/test/pools/pool_base_alloc.cpp +++ b/test/pools/pool_base_alloc.cpp @@ -4,8 +4,8 @@ #include -#include "umf/pools/pool_scalable.h" -#include "umf/providers/provider_os_memory.h" +#include +#include #include "pool.hpp" #include "poolFixtures.hpp" diff --git a/test/pools/scalable_coarse_devdax.cpp b/test/pools/scalable_coarse_devdax.cpp index 49870396c..8dc8d576b 100644 --- a/test/pools/scalable_coarse_devdax.cpp +++ b/test/pools/scalable_coarse_devdax.cpp @@ -2,8 +2,8 @@ // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include "umf/pools/pool_scalable.h" -#include "umf/providers/provider_devdax_memory.h" +#include +#include #include "pool_coarse.hpp" diff --git a/test/pools/scalable_coarse_file.cpp b/test/pools/scalable_coarse_file.cpp index bfd8964c3..b9865b781 100644 --- a/test/pools/scalable_coarse_file.cpp +++ b/test/pools/scalable_coarse_file.cpp @@ -2,8 +2,8 @@ // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include "umf/pools/pool_scalable.h" -#include "umf/providers/provider_file_memory.h" +#include +#include #include "pool_coarse.hpp" diff --git a/test/pools/scalable_pool.cpp b/test/pools/scalable_pool.cpp index b961d4f5e..0c6830201 100644 --- a/test/pools/scalable_pool.cpp +++ b/test/pools/scalable_pool.cpp @@ -2,8 +2,8 @@ // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include "umf/pools/pool_scalable.h" -#include "umf/providers/provider_os_memory.h" +#include +#include #include "pool.hpp" #include "poolFixtures.hpp"