A Scalable Memory Allocator for Multithreaded Applications on a Many-Core Shared-Memory Machine
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
batch_mmap.cpp
batch_mmap.hpp
build.ninja
chunk.cpp
chunk.hpp
chunk_linked_array_list.hpp
debug.hpp
envar.hpp
init_term.cpp
init_term.hpp
mac.hpp
mcmalloc.cpp
mcmalloc.hpp
mcmalloc_impl.hpp
memory_chunk_size.cpp
memory_chunk_size.hpp
misc.hpp
myprintf.hpp
stack.hpp
status.hpp
thread_util.hpp

README.md

MCMalloc: A Scalable Memory Allocator for Multithreaded Applications on a Many-Core Shared-Memory Machine

MCMalloc library enables to control local heaps to speed up memory allocation and deallocation by batch malloc, pseudo free, and fine-grained data-locking. (This library is updated version of FCMalloc.)

MCMalloc: A scalable memory allocator for multithreaded applications on a many-core shared-memory machine - IEEE Conference Publication

how to build

Ninja, GCC are required to build MCMalloc library.

$ ninja

how to run

In order to use MCMalloc library, set environment variable LD_PRELOAD to the path to libmcmalloc.so. For example, zsh uses MCMalloc library; e.g.

LD_PRELOAD=./libmcmalloc.so zsh

NOTE

  • The following functions are unsupported.
    • pvalloc
    • mallopt
  • Memory allocated within libmcmalloc.so is not released unless the process is terminated.

References

  • TCMalloc
  • JEmalloc
    • Evans, J., "A Scalable Concurrent malloc(3) Implementation for FreeBSD", Proc. of BSDCan, 2006.
  • Supermalloc
    • Kuszmaul, B. C., "Supermalloc: A Super Fast Multithreaded Malloc for 64-bit Machines", Proc. of ISMM, pp. 41-55, 2015.
  • FHE
    • Gentry, C., "A Fully Homomorphic Encryption Scheme", Ph.D. Thesis, Stanford University, 2009.
  • HElib