Abstract
Memory allocation, while representing a small fraction of total instructions, significantly impacts the performance of multi-threaded applications due to cache pollution and synchronization overhead. This paper presents SpeedMalloc, a hardware-software co-design that offloads memory allocation tasks to a dedicated, lightweight "support-core." By isolating allocator metadata and replacing atomic synchronization with a message-passing interface, SpeedMalloc achieves up to a 1.75× speedup and improves energy efficiency by up to 1.69× compared to state-of-the-art software allocators.
Introduction
In modern data center environments, the "butterfly effect" of memory allocation is pronounced: though allocation logic typically comprises only ~2% of code and ~5% of executed instructions, the choice of allocator can lead to a 2.7× swing in overall performance. This performance variability is driven by two main factors: cache pollution and metadata synchronization. Allocator metadata—the bookkeeping used to track free memory—often competes for space in the same caches as application data. Frequent allocations evict useful data, increasing cache misses. Additionally, software allocators rely on atomic instructions for synchronization, which can consume hundreds of cycles and create bottlenecks as thread counts scale.
System Design
SpeedMalloc addresses these issues by centralizing allocation on a dedicated "support-core." This core is a micro-controller grade, in-order processor that occupies approximately 1–2% of a modern processor's area.
The architecture physically separates allocator metadata from application data by housing it in the support-core's private L1 cache. To facilitate communication, the system introduces four new ISA instructions (mallocstart, freestart, mallocend, and freeend) and utilizes Hardware Message Queues (HMQ) with a round-robin scheduler. This design allows main cores to issue allocation requests asynchronously, eliminating the need for expensive cross-core atomic synchronization.
Evaluation and Results
The system was evaluated using the gem5 full-system simulator with 1 to 16 main cores across diverse workloads, including graph processing (GAPBS), databases (Redis), and standard allocator benchmarks (Mimalloc-bench).
SpeedMalloc demonstrated significant performance gains over industry-standard allocators. On 16-thread workloads, it achieved average speedups of 1.75× over Jemalloc, 1.18× over TCMalloc, and 1.15× over Mimalloc. Furthermore, it outperformed existing hardware accelerators like Mallacc and Memento by 1.23× and 1.18×, respectively. Despite the addition of a support core, total system energy consumption was reduced by 1.12× to 1.69× because the main cores completed tasks more rapidly.
Discussion and Conclusion
A key advantage of SpeedMalloc is its programmability. Unlike fixed-function hardware accelerators, the support-core is a general-purpose processor capable of running firmware updates. This flexibility is essential for adapting to the rapid evolution of software allocators.
While the current study demonstrates strong results for up to 16 cores, scaling to warehouse-scale chips (64+ cores) may require a hierarchical approach with multiple support cores. Additionally, adoption requires ISA and compiler modifications. Nevertheless, SpeedMalloc proves that isolating critical system tasks on lightweight, specialized hardware can provide substantial performance and energy benefits for modern multi-threaded applications.
Summary updated