Skip to content

Commit 3f14f08

Browse files
authored
Merge pull request #1053 from ldorau/Fix_disjoint_pool_unit_tests
Fix disjoint_pool unit tests
2 parents 8a04465 + 2e53465 commit 3f14f08

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/pools/disjoint_pool.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2023-2024 Intel Corporation
1+
// Copyright (C) 2023-2025 Intel Corporation
22
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

@@ -61,14 +61,14 @@ TEST_F(test, freeErrorPropagation) {
6161
static umf_result_t expectedResult = UMF_RESULT_SUCCESS;
6262
struct memory_provider : public umf_test::provider_base_t {
6363
umf_result_t alloc(size_t size, size_t, void **ptr) noexcept {
64-
*ptr = malloc(size);
64+
*ptr = umf_ba_global_alloc(size);
6565
return UMF_RESULT_SUCCESS;
6666
}
6767

6868
umf_result_t free(void *ptr, [[maybe_unused]] size_t size) noexcept {
6969
// do the actual free only when we expect the success
7070
if (expectedResult == UMF_RESULT_SUCCESS) {
71-
::free(ptr);
71+
umf_ba_global_free(ptr);
7272
}
7373
return expectedResult;
7474
}
@@ -114,12 +114,12 @@ TEST_F(test, sharedLimits) {
114114

115115
struct memory_provider : public umf_test::provider_base_t {
116116
umf_result_t alloc(size_t size, size_t, void **ptr) noexcept {
117-
*ptr = malloc(size);
117+
*ptr = umf_ba_global_alloc(size);
118118
numAllocs++;
119119
return UMF_RESULT_SUCCESS;
120120
}
121121
umf_result_t free(void *ptr, [[maybe_unused]] size_t size) noexcept {
122-
::free(ptr);
122+
umf_ba_global_free(ptr);
123123
numFrees++;
124124
return UMF_RESULT_SUCCESS;
125125
}

0 commit comments

Comments
 (0)