llama.cpp b10188 fixes Metal memory leak on Apple Silicon
New llama.cpp release patches memory leaks when models exit without GPU ops.
llama.cpp, the widely used open-source C++ library for running LLaMA models on consumer hardware, has released a new tag, b10188, focused on fixing memory management issues in its Metal backend. The release, authored by GitHub Actions and signed with a verified GPG key, includes five commits primarily addressing bugs that occur when a model is freed without any GPU operations having been performed. The key fixes are: fixing memory unwire, fixing a memory leak, running dummy work only if residency sets are used, and wrapping a function in #if defined for conditional compilation. A regression test that measures system-wide wired memory was also added.
These changes matter for developers running LLM inference on Apple Silicon (macOS and iOS) and other platforms that use the Metal GPU backend. Previously, freeing a model without triggering GPU operations could leave wired memory allocated, causing leaks and memory pressure over time. This patch ensures proper cleanup, improving stability for long-running processes like local API servers or background inference jobs. The release also includes prebuilt binaries for a huge range of environments: macOS (arm64, Intel, KleidiAI), iOS, Linux (CPU, Vulkan, ROCm, OpenVINO, SYCL), Android, Windows (CUDA, Vulkan, OpenCL, HIP), and even openEuler with Ascend ACL Graph. Users can update via the official GitHub releases page to get the fix.
- Fixes a Metal memory leak when models are freed without any GPU operations
- Adds dummy work guard so it runs only when residency sets are used
- Includes regression test measuring system-wide wired memory
Why It Matters
For developers running local LLM servers on Apple Silicon, this patch prevents memory leaks and improves stability over time.