1
1
/*
2
- * Copyright (C) 2024 Intel Corporation
2
+ * Copyright (C) 2024-2025 Intel Corporation
3
3
*
4
4
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
5
5
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
@@ -138,7 +138,7 @@ static size_t get_size_threshold(void) {
138
138
LOG_DEBUG ("UMF_PROXY[size.threshold] = %s" , str_threshold );
139
139
long threshold = utils_get_size_threshold (str_threshold );
140
140
if (threshold < 0 ) {
141
- LOG_ERR ("incorrect size threshold: %s" , str_threshold );
141
+ LOG_FATAL ("incorrect size threshold: %s" , str_threshold );
142
142
exit (-1 );
143
143
}
144
144
@@ -163,6 +163,8 @@ static int get_system_allocator_symbols(void) {
163
163
return 0 ;
164
164
}
165
165
166
+ LOG_FATAL ("Required system allocator's symbols not found." );
167
+
166
168
return -1 ;
167
169
}
168
170
#endif /* _WIN32 */
@@ -174,15 +176,15 @@ void proxy_lib_create_common(void) {
174
176
175
177
umf_result = umfOsMemoryProviderParamsCreate (& os_params );
176
178
if (umf_result != UMF_RESULT_SUCCESS ) {
177
- LOG_ERR ("creating OS memory provider params failed" );
179
+ LOG_FATAL ("creating OS memory provider params failed" );
178
180
exit (-1 );
179
181
}
180
182
181
183
#ifndef _WIN32
182
184
size_t _threshold = get_size_threshold ();
183
185
if (_threshold > 0 ) {
184
186
if (get_system_allocator_symbols ()) {
185
- LOG_ERR ("initialization of the system allocator failed!" );
187
+ LOG_FATAL ("initialization of the system allocator failed!" );
186
188
exit (-1 );
187
189
}
188
190
@@ -197,20 +199,20 @@ void proxy_lib_create_common(void) {
197
199
umf_result = umfOsMemoryProviderParamsSetVisibility (os_params ,
198
200
UMF_MEM_MAP_SHARED );
199
201
if (umf_result != UMF_RESULT_SUCCESS ) {
200
- LOG_ERR ("setting visibility mode failed" );
202
+ LOG_FATAL ("setting visibility mode failed" );
201
203
exit (-1 );
202
204
}
203
205
umf_result = umfOsMemoryProviderParamsSetShmName (os_params , NULL );
204
206
if (umf_result != UMF_RESULT_SUCCESS ) {
205
- LOG_ERR ("setting shared memory name failed" );
207
+ LOG_FATAL ("setting shared memory name failed" );
206
208
exit (-1 );
207
209
}
208
210
} else if (utils_env_var_has_str ("UMF_PROXY" ,
209
211
"page.disposition=shared-shm" )) {
210
212
umf_result = umfOsMemoryProviderParamsSetVisibility (os_params ,
211
213
UMF_MEM_MAP_SHARED );
212
214
if (umf_result != UMF_RESULT_SUCCESS ) {
213
- LOG_ERR ("setting visibility mode failed" );
215
+ LOG_FATAL ("setting visibility mode failed" );
214
216
exit (-1 );
215
217
}
216
218
@@ -219,7 +221,7 @@ void proxy_lib_create_common(void) {
219
221
sprintf (shm_name , "umf_proxy_lib_shm_pid_%i" , utils_getpid ());
220
222
umf_result = umfOsMemoryProviderParamsSetShmName (os_params , shm_name );
221
223
if (umf_result != UMF_RESULT_SUCCESS ) {
222
- LOG_ERR ("setting shared memory name failed" );
224
+ LOG_FATAL ("setting shared memory name failed" );
223
225
exit (-1 );
224
226
}
225
227
@@ -233,14 +235,14 @@ void proxy_lib_create_common(void) {
233
235
& OS_memory_provider );
234
236
umfOsMemoryProviderParamsDestroy (os_params );
235
237
if (umf_result != UMF_RESULT_SUCCESS ) {
236
- LOG_ERR ("creating OS memory provider failed" );
238
+ LOG_FATAL ("creating OS memory provider failed" );
237
239
exit (-1 );
238
240
}
239
241
240
242
umf_result = umfPoolCreate (umfPoolManagerOps (), OS_memory_provider , NULL , 0 ,
241
243
& Proxy_pool );
242
244
if (umf_result != UMF_RESULT_SUCCESS ) {
243
- LOG_ERR ("creating UMF pool manager failed" );
245
+ LOG_FATAL ("creating UMF pool manager failed" );
244
246
exit (-1 );
245
247
}
246
248
0 commit comments