| 385 | } |
| 386 | |
| 387 | void ggml_aligned_free(void * ptr, size_t size) { |
| 388 | GGML_UNUSED(size); |
| 389 | #if defined(_MSC_VER) || defined(__MINGW32__) |
| 390 | _aligned_free(ptr); |
| 391 | #elif GGML_USE_CPU_HBM |
| 392 | if (ptr != NULL) { |
| 393 | hbw_free(ptr); |
| 394 | } |
| 395 | #elif TARGET_OS_OSX |
| 396 | if (ptr != NULL) { |
| 397 | vm_deallocate((vm_map_t)mach_task_self(), (vm_address_t)ptr, size); |
| 398 | } |
| 399 | #else |
| 400 | free(ptr); |
| 401 | #endif |
| 402 | } |
| 403 | |
| 404 | |
| 405 | inline static void * ggml_malloc(size_t size) { |
no outgoing calls
no test coverage detected