jwmalloc: A Verified Memory Allocator for Mobile Devices

Jiawei Wang, Ming Fu, Ruixian Wang, and Chao Xu, Huawei Central Software Institute; Jonas Oberhauser, Huawei Central Software Institute and Huawei Hilbert Research Center; Haibo Chen, Huawei Central Software Institute and Shanghai Jiao Tong University

Dynamic memory allocators provide memory allocation and release functionality to languages such as C, C++, and Rust. Existing allocators have been primarily optimized for performance and timely memory release. However, emerging mobile workloads also emphasize CPU, energy, and memory usage under soft real-time constraints.

We present jwmalloc, a novel memory allocator built from the ground up to address these mobile-specific challenges. It is based on three key innovations: a uniform slab size with pooling that enables immediate cross-size-class reuse of any emptied slab; the closed sibling tree, a new data structure for efficiently managing fragments; and a two-buffer lifetime tracker that categorizes short- and long-lived objects to guide memory reclamation. For timely response in soft real-time and oversubscription scenarios, all operations are non-blocking. We verified jwmalloc with a bounded model checker under weak memory models. Replacing jemalloc on a flagship smartphone running real-world workloads, jwmalloc reduces whole-system instructions by 10% and cuts allocator-side instruction counts by 3.84x, while lowering CPU power consumption by 5-11%, all at a comparable memory footprint. jwmalloc has been deployed in production on 12 million commercial mobile devices, operating stably for over 30 billion user hours.

OSDI '26 Open Access Sponsored by
King Abdullah University of Science and Technology (KAUST)

Open Access Media

USENIX is committed to Open Access to the research presented at our events. Papers and proceedings are freely available to everyone once the event begins. Any video, audio, and/or slides that are posted after the event are also free and open to everyone. Support USENIX and our commitment to Open Access.

BibTeX
@inproceedings {318648,
author = {Jiawei Wang and Ming Fu and Ruixian Wang and Chao Xu and Jonas Oberhauser and Haibo Chen},
title = {jwmalloc: A Verified Memory Allocator for Mobile Devices},
booktitle = {20th USENIX Symposium on Operating Systems Design and Implementation (OSDI 26)},
year = {2026},
isbn = {978-1-939133-55-7},
address = {Seattle, WA},
pages = {2515--2531},
url = {https://www.usenix.org/conference/osdi26/presentation/wang-jiawei},
publisher = {USENIX Association},
month = jul
}