1212#include < umf/pools/pool_disjoint.h>
1313#include < umf/providers/provider_coarse.h>
1414
15+ using umf_test::BA_GLOBAL_SPLIT_MERGE_OPS;
1516using umf_test::KB;
1617using umf_test::MB;
1718using umf_test::test;
1819
1920#define GetStats umfCoarseMemoryProviderGetStats
2021
21- umf_memory_provider_ops_t UMF_MALLOC_MEMORY_PROVIDER_OPS =
22- umf::providerMakeCOps<umf_test::provider_ba_global, void >();
23-
2422struct CoarseWithMemoryStrategyTest
2523 : umf_test::test,
2624 ::testing::WithParamInterface<coarse_memory_provider_strategy_t > {
@@ -39,13 +37,13 @@ INSTANTIATE_TEST_SUITE_P(
3937 UMF_COARSE_MEMORY_STRATEGY_CHECK_ALL_SIZE));
4038
4139TEST_P (CoarseWithMemoryStrategyTest, disjointCoarseMallocPool_basic) {
42- umf_memory_provider_handle_t malloc_memory_provider ;
40+ umf_memory_provider_handle_t ba_global_split_merge_provider ;
4341 umf_result_t umf_result;
4442
45- umf_result = umfMemoryProviderCreate (&UMF_MALLOC_MEMORY_PROVIDER_OPS , NULL ,
46- &malloc_memory_provider );
43+ umf_result = umfMemoryProviderCreate (&BA_GLOBAL_SPLIT_MERGE_OPS , NULL ,
44+ &ba_global_split_merge_provider );
4745 ASSERT_EQ (umf_result, UMF_RESULT_SUCCESS);
48- ASSERT_NE (malloc_memory_provider , nullptr );
46+ ASSERT_NE (ba_global_split_merge_provider , nullptr );
4947
5048 const size_t init_buffer_size = 20 * MB;
5149
@@ -55,7 +53,7 @@ TEST_P(CoarseWithMemoryStrategyTest, disjointCoarseMallocPool_basic) {
5553 sizeof (coarse_memory_provider_params));
5654 coarse_memory_provider_params.allocation_strategy = allocation_strategy;
5755 coarse_memory_provider_params.upstream_memory_provider =
58- malloc_memory_provider ;
56+ ba_global_split_merge_provider ;
5957 coarse_memory_provider_params.destroy_upstream_memory_provider = true ;
6058 coarse_memory_provider_params.immediate_init_from_upstream = true ;
6159 coarse_memory_provider_params.init_buffer = nullptr ;
@@ -224,20 +222,20 @@ TEST_P(CoarseWithMemoryStrategyTest, disjointCoarseMallocPool_basic) {
224222 ASSERT_EQ (GetStats (prov).alloc_size , init_buffer_size);
225223
226224 umfPoolDestroy (pool);
227- // Both coarse_memory_provider and malloc_memory_provider
225+ // Both coarse_memory_provider and ba_global_split_merge_provider
228226 // have already been destroyed by umfPoolDestroy(), because:
229227 // UMF_POOL_CREATE_FLAG_OWN_PROVIDER was set in umfPoolCreate() and
230228 // coarse_memory_provider_params.destroy_upstream_memory_provider = true;
231229}
232230
233231TEST_P (CoarseWithMemoryStrategyTest, disjointCoarseMallocPool_simple1) {
234- umf_memory_provider_handle_t malloc_memory_provider ;
232+ umf_memory_provider_handle_t ba_global_split_merge_provider ;
235233 umf_result_t umf_result;
236234
237- umf_result = umfMemoryProviderCreate (&UMF_MALLOC_MEMORY_PROVIDER_OPS , NULL ,
238- &malloc_memory_provider );
235+ umf_result = umfMemoryProviderCreate (&BA_GLOBAL_SPLIT_MERGE_OPS , NULL ,
236+ &ba_global_split_merge_provider );
239237 ASSERT_EQ (umf_result, UMF_RESULT_SUCCESS);
240- ASSERT_NE (malloc_memory_provider , nullptr );
238+ ASSERT_NE (ba_global_split_merge_provider , nullptr );
241239
242240 const size_t init_buffer_size = 20 * MB;
243241
@@ -247,7 +245,7 @@ TEST_P(CoarseWithMemoryStrategyTest, disjointCoarseMallocPool_simple1) {
247245 sizeof (coarse_memory_provider_params));
248246 coarse_memory_provider_params.allocation_strategy = allocation_strategy;
249247 coarse_memory_provider_params.upstream_memory_provider =
250- malloc_memory_provider ;
248+ ba_global_split_merge_provider ;
251249 coarse_memory_provider_params.immediate_init_from_upstream = true ;
252250 coarse_memory_provider_params.init_buffer = NULL ;
253251 coarse_memory_provider_params.init_buffer_size = init_buffer_size;
@@ -337,17 +335,17 @@ TEST_P(CoarseWithMemoryStrategyTest, disjointCoarseMallocPool_simple1) {
337335
338336 umfPoolDestroy (pool);
339337 umfMemoryProviderDestroy (coarse_memory_provider);
340- umfMemoryProviderDestroy (malloc_memory_provider );
338+ umfMemoryProviderDestroy (ba_global_split_merge_provider );
341339}
342340
343341TEST_P (CoarseWithMemoryStrategyTest, disjointCoarseMallocPool_simple2) {
344- umf_memory_provider_handle_t malloc_memory_provider ;
342+ umf_memory_provider_handle_t ba_global_split_merge_provider ;
345343 umf_result_t umf_result;
346344
347- umf_result = umfMemoryProviderCreate (&UMF_MALLOC_MEMORY_PROVIDER_OPS , NULL ,
348- &malloc_memory_provider );
345+ umf_result = umfMemoryProviderCreate (&BA_GLOBAL_SPLIT_MERGE_OPS , NULL ,
346+ &ba_global_split_merge_provider );
349347 ASSERT_EQ (umf_result, UMF_RESULT_SUCCESS);
350- ASSERT_NE (malloc_memory_provider , nullptr );
348+ ASSERT_NE (ba_global_split_merge_provider , nullptr );
351349
352350 const size_t init_buffer_size = 20 * MB;
353351
@@ -357,7 +355,7 @@ TEST_P(CoarseWithMemoryStrategyTest, disjointCoarseMallocPool_simple2) {
357355 sizeof (coarse_memory_provider_params));
358356 coarse_memory_provider_params.allocation_strategy = allocation_strategy;
359357 coarse_memory_provider_params.upstream_memory_provider =
360- malloc_memory_provider ;
358+ ba_global_split_merge_provider ;
361359 coarse_memory_provider_params.immediate_init_from_upstream = true ;
362360 coarse_memory_provider_params.init_buffer = NULL ;
363361 coarse_memory_provider_params.init_buffer_size = init_buffer_size;
@@ -416,7 +414,7 @@ TEST_P(CoarseWithMemoryStrategyTest, disjointCoarseMallocPool_simple2) {
416414
417415 umfPoolDestroy (pool);
418416 umfMemoryProviderDestroy (coarse_memory_provider);
419- umfMemoryProviderDestroy (malloc_memory_provider );
417+ umfMemoryProviderDestroy (ba_global_split_merge_provider );
420418}
421419
422420struct alloc_ptr_size {
0 commit comments