Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Bring back KSM (MADV_MERGEABLE) support
authorGabriel Corona <gabriel.corona@loria.fr>
Mon, 28 Sep 2015 10:20:51 +0000 (12:20 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Fri, 2 Oct 2015 11:15:18 +0000 (13:15 +0200)
commit4801057254232c8283c0d392783eea07ecdd874f
tree985734b6ddf90cb70636c0bb71533a0ee5db3dc2
parent64a1599658f6c313f789471fc829a574fa32bd70
[mc] Bring back KSM (MADV_MERGEABLE) support

For KSM support, we allocate the memory for the snapshot regions
directly with mmap() instead of using malloc(). This way we can safely
mark them as MERGEABLE without impacting the heap at all.

Another solution would be to use posix_memalign() (now that we are
using a full-featured malloc) to allocate page-aligned buffers and
remove MADV_UNMERGEABLE when deallocating.
src/include/mc/mc.h
src/mc/RegionSnapshot.cpp
src/mc/mc_config.cpp
src/simgrid/sg_config.c