11/*
2- * Copyright (C) 2024 Intel Corporation
2+ * Copyright (C) 2024-2025 Intel Corporation
33 *
44 * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
55 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
@@ -138,7 +138,7 @@ static size_t get_size_threshold(void) {
138138 LOG_DEBUG ("UMF_PROXY[size.threshold] = %s" , str_threshold );
139139 long threshold = utils_get_size_threshold (str_threshold );
140140 if (threshold < 0 ) {
141- LOG_ERR ("incorrect size threshold: %s" , str_threshold );
141+ LOG_FATAL ("incorrect size threshold: %s" , str_threshold );
142142 exit (-1 );
143143 }
144144
@@ -163,6 +163,8 @@ static int get_system_allocator_symbols(void) {
163163 return 0 ;
164164 }
165165
166+ LOG_FATAL ("Required system allocator's symbols not found." );
167+
166168 return -1 ;
167169}
168170#endif /* _WIN32 */
@@ -174,15 +176,15 @@ void proxy_lib_create_common(void) {
174176
175177 umf_result = umfOsMemoryProviderParamsCreate (& os_params );
176178 if (umf_result != UMF_RESULT_SUCCESS ) {
177- LOG_ERR ("creating OS memory provider params failed" );
179+ LOG_FATAL ("creating OS memory provider params failed" );
178180 exit (-1 );
179181 }
180182
181183#ifndef _WIN32
182184 size_t _threshold = get_size_threshold ();
183185 if (_threshold > 0 ) {
184186 if (get_system_allocator_symbols ()) {
185- LOG_ERR ("initialization of the system allocator failed!" );
187+ LOG_FATAL ("initialization of the system allocator failed!" );
186188 exit (-1 );
187189 }
188190
@@ -197,20 +199,20 @@ void proxy_lib_create_common(void) {
197199 umf_result = umfOsMemoryProviderParamsSetVisibility (os_params ,
198200 UMF_MEM_MAP_SHARED );
199201 if (umf_result != UMF_RESULT_SUCCESS ) {
200- LOG_ERR ("setting visibility mode failed" );
202+ LOG_FATAL ("setting visibility mode failed" );
201203 exit (-1 );
202204 }
203205 umf_result = umfOsMemoryProviderParamsSetShmName (os_params , NULL );
204206 if (umf_result != UMF_RESULT_SUCCESS ) {
205- LOG_ERR ("setting shared memory name failed" );
207+ LOG_FATAL ("setting shared memory name failed" );
206208 exit (-1 );
207209 }
208210 } else if (utils_env_var_has_str ("UMF_PROXY" ,
209211 "page.disposition=shared-shm" )) {
210212 umf_result = umfOsMemoryProviderParamsSetVisibility (os_params ,
211213 UMF_MEM_MAP_SHARED );
212214 if (umf_result != UMF_RESULT_SUCCESS ) {
213- LOG_ERR ("setting visibility mode failed" );
215+ LOG_FATAL ("setting visibility mode failed" );
214216 exit (-1 );
215217 }
216218
@@ -219,7 +221,7 @@ void proxy_lib_create_common(void) {
219221 sprintf (shm_name , "umf_proxy_lib_shm_pid_%i" , utils_getpid ());
220222 umf_result = umfOsMemoryProviderParamsSetShmName (os_params , shm_name );
221223 if (umf_result != UMF_RESULT_SUCCESS ) {
222- LOG_ERR ("setting shared memory name failed" );
224+ LOG_FATAL ("setting shared memory name failed" );
223225 exit (-1 );
224226 }
225227
@@ -233,14 +235,14 @@ void proxy_lib_create_common(void) {
233235 & OS_memory_provider );
234236 umfOsMemoryProviderParamsDestroy (os_params );
235237 if (umf_result != UMF_RESULT_SUCCESS ) {
236- LOG_ERR ("creating OS memory provider failed" );
238+ LOG_FATAL ("creating OS memory provider failed" );
237239 exit (-1 );
238240 }
239241
240242 umf_result = umfPoolCreate (umfPoolManagerOps (), OS_memory_provider , NULL , 0 ,
241243 & Proxy_pool );
242244 if (umf_result != UMF_RESULT_SUCCESS ) {
243- LOG_ERR ("creating UMF pool manager failed" );
245+ LOG_FATAL ("creating UMF pool manager failed" );
244246 exit (-1 );
245247 }
246248
0 commit comments