Mesh: compacting memory management for C/C++ applications

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%.

[1]  Kathryn S. McKinley,et al.  Hoard: a scalable memory allocator for multithreaded applications , 2000, SIGP.

[2]  Emery D. Berger,et al.  DieHard: probabilistic memory safety for unsafe languages , 2006, PLDI '06.

[3]  Michael Wolf,et al.  The pauseless GC algorithm , 2005, VEE '05.

[4]  Jason Evans April A Scalable Concurrent malloc(3) Implementation for FreeBSD , 2006 .

[5]  Emery D. Berger,et al.  Efficiently and precisely locating memory leaks and bloat , 2009, PLDI '09.

[6]  Paul R. Wilson,et al.  The memory fragmentation problem: solved? , 1998, ISMM '98.

[7]  Emery D. Berger,et al.  DieHarder: securing the heap , 2010, CCS '10.

[8]  Michael Wolf,et al.  C4: the continuously concurrent compacting collector , 2011, ISMM '11.

[9]  David Detlefs Garbage Collection and Run-time Typing as a C++ Library , 1992, C++ Conference.

[10]  David Zuckerman Linear Degree Extractors and the Inapproximability of Max Clique and Chromatic Number , 2007, Theory Comput..

[11]  Wilfred J. Hansen,et al.  Compact list representation: definition, garbage collection, and system implementation , 1969, CACM.

[12]  R FenichelRobert,et al.  A LISP garbage-collector for virtual-memory computer systems , 1969 .

[13]  Engin Ipek,et al.  Dynamically replicated memory: building reliable systems from nanoscale resistive memories , 2010, ASPLOS XV.

[14]  John Michael Robson,et al.  Worst Case Fragmentation of First Fit and Best Fit Storage Allocation Strategies , 1977, Comput. J..

[15]  Robert Fenichel,et al.  A LISP garbage-collector for virtual-memory computer systems , 1969, CACM.

[16]  Daniel R. Edelson Precompiling C++ for Garbage Collection , 1992, IWMM.