- // When KSM support is enables, we allocate memory using mmap:
- // * we don't want to advise bits of the heap as mergable
- // * mmap gives data aligned on page boundaries which is merge friendly
- simgrid::mc::Buffer data;
- if (_sg_mc_ksm)
- data = Buffer::mmap(size);
- else
- data = Buffer::malloc(size);