File tree Expand file tree Collapse file tree 1 file changed +21
-21
lines changed Expand file tree Collapse file tree 1 file changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,27 @@ void *calloc(size_t nmemb, size_t size) {
202
202
return ba_leak_calloc (nmemb , size );
203
203
}
204
204
205
+ void free (void * ptr ) {
206
+ if (ptr == NULL ) {
207
+ return ;
208
+ }
209
+
210
+ if (ba_leak_free (ptr ) == 0 ) {
211
+ return ;
212
+ }
213
+
214
+ if (Proxy_pool ) {
215
+ if (umfPoolFree (Proxy_pool , ptr ) != UMF_RESULT_SUCCESS ) {
216
+ fprintf (stderr , "error: umfPoolFree() failed\n" );
217
+ assert (0 );
218
+ }
219
+ return ;
220
+ }
221
+
222
+ assert (0 );
223
+ return ;
224
+ }
225
+
205
226
void * realloc (void * ptr , size_t size ) {
206
227
if (ptr == NULL ) {
207
228
return malloc (size );
@@ -228,27 +249,6 @@ void *realloc(void *ptr, size_t size) {
228
249
return NULL ;
229
250
}
230
251
231
- void free (void * ptr ) {
232
- if (ptr == NULL ) {
233
- return ;
234
- }
235
-
236
- if (ba_leak_free (ptr ) == 0 ) {
237
- return ;
238
- }
239
-
240
- if (Proxy_pool ) {
241
- if (umfPoolFree (Proxy_pool , ptr ) != UMF_RESULT_SUCCESS ) {
242
- fprintf (stderr , "error: umfPoolFree() failed\n" );
243
- assert (0 );
244
- }
245
- return ;
246
- }
247
-
248
- assert (0 );
249
- return ;
250
- }
251
-
252
252
void * aligned_alloc (size_t alignment , size_t size ) {
253
253
if (!was_called_from_umfPool && Proxy_pool ) {
254
254
was_called_from_umfPool = 1 ;
You can’t perform that action at this time.
0 commit comments