# Mesh: Compacting Memory Management for C/C++ Applications

**Authors:** Bobby Powers, David Tench, Emery D. Berger, Andrew McGregor

arXiv: 1902.04738 · 2020-04-30

## TL;DR

Mesh is a novel memory allocator for C/C++ that effectively eliminates fragmentation, reduces memory usage, and maintains competitive performance, significantly benefiting real-world applications like Firefox and Redis.

## Contribution

Mesh introduces a new randomized algorithm-based memory management approach that provably reduces fragmentation in unmodified C/C++ applications, surpassing classical bounds.

## Key findings

- Reduces Firefox memory usage by 16%.
- Reduces Redis memory usage by 39%.
- Maintains performance comparable to state-of-the-art allocators.

## Abstract

Programs written in C/C++ can suffer from serious memory fragmentation, leading to low utilization of memory, degraded performance, and application failure due to memory exhaustion. This paper introduces Mesh, a plug-in replacement for malloc that, for the first time, eliminates fragmentation in unmodified C/C++ applications. Mesh combines novel randomized algorithms with widely-supported virtual memory operations to provably reduce fragmentation, breaking the classical Robson bounds with high probability. Mesh generally matches the runtime performance of state-of-the-art memory allocators while reducing memory consumption; in particular, it reduces the memory of consumption of Firefox by 16% and Redis by 39%.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1902.04738/full.md

## Figures

16 figures with captions in the complete paper: https://tomesphere.com/paper/1902.04738/full.md

## References

31 references — full list in the complete paper: https://tomesphere.com/paper/1902.04738/full.md

---
Source: https://tomesphere.com/paper/1902.04738