|
1 |
| -// Copyright (C) 2023-2024 Intel Corporation |
| 1 | +// Copyright (C) 2023-2025 Intel Corporation |
2 | 2 | // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
|
3 | 3 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
4 | 4 |
|
@@ -61,14 +61,14 @@ TEST_F(test, freeErrorPropagation) {
|
61 | 61 | static umf_result_t expectedResult = UMF_RESULT_SUCCESS;
|
62 | 62 | struct memory_provider : public umf_test::provider_base_t {
|
63 | 63 | umf_result_t alloc(size_t size, size_t, void **ptr) noexcept {
|
64 |
| - *ptr = malloc(size); |
| 64 | + *ptr = umf_ba_global_alloc(size); |
65 | 65 | return UMF_RESULT_SUCCESS;
|
66 | 66 | }
|
67 | 67 |
|
68 | 68 | umf_result_t free(void *ptr, [[maybe_unused]] size_t size) noexcept {
|
69 | 69 | // do the actual free only when we expect the success
|
70 | 70 | if (expectedResult == UMF_RESULT_SUCCESS) {
|
71 |
| - ::free(ptr); |
| 71 | + umf_ba_global_free(ptr); |
72 | 72 | }
|
73 | 73 | return expectedResult;
|
74 | 74 | }
|
@@ -114,12 +114,12 @@ TEST_F(test, sharedLimits) {
|
114 | 114 |
|
115 | 115 | struct memory_provider : public umf_test::provider_base_t {
|
116 | 116 | umf_result_t alloc(size_t size, size_t, void **ptr) noexcept {
|
117 |
| - *ptr = malloc(size); |
| 117 | + *ptr = umf_ba_global_alloc(size); |
118 | 118 | numAllocs++;
|
119 | 119 | return UMF_RESULT_SUCCESS;
|
120 | 120 | }
|
121 | 121 | umf_result_t free(void *ptr, [[maybe_unused]] size_t size) noexcept {
|
122 |
| - ::free(ptr); |
| 122 | + umf_ba_global_free(ptr); |
123 | 123 | numFrees++;
|
124 | 124 | return UMF_RESULT_SUCCESS;
|
125 | 125 | }
|
|
0 commit comments