Skip to content
/ Mesh Public
forked from plasma-umass/Mesh

A memory allocator that automatically reduces the memory footprint of C/C++ applications.

Notifications You must be signed in to change notification settings

abernard/Mesh

 
 

Repository files navigation

Mesh: A compacting malloc(3) implementation

Mesh is a drop in replacement for malloc(3) that compacts the heap of C and C++ programs without rewriting application pointers.

Implementation Overview

Mesh is built on Heap Layers, an infrastructure for building high performance memory allocators in C++ (see paper for details.

The entry point of the library is libmesh.cc. This file is where malloc, free and the instantiations of the Heap used for allocating program memory lives.

DEFINITIONS

  • Page: The smallest block of memory managed by the operating system, 4Kb on most architectures. Memory given to the allocator by the operating system is always in multiples of the page size, and aligned to the page size.
  • Span: The size of memory managed by Mesh -- currently 128 Kb. It is larger than the page size to amortize the cost of heap metadata.
  • MiniHeap: A bitmap, metadata and associated Span for a particular size of objects (size class).
  • MeshingHeap: A collection of miniheaps for a particular size class, including a current MiniHeap that we are allocating out of.

BUILDING

$ git submodule update --init; ./configure; make

About

A memory allocator that automatically reduces the memory footprint of C/C++ applications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 58.6%
  • Python 24.5%
  • C 13.4%
  • Makefile 3.2%
  • Other 0.3%