From: Tom Cornebize Date: Fri, 14 Apr 2017 09:23:49 +0000 (+0200) Subject: Call munmap with the size in smpi_shared_free. X-Git-Tag: v3.16~353^2^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/4b335d53942c847cc4c978e58697d22a3c2897ff Call munmap with the size in smpi_shared_free. --- diff --git a/src/smpi/smpi_shared.cpp b/src/smpi/smpi_shared.cpp index 04c73f637e..67159714db 100644 --- a/src/smpi/smpi_shared.cpp +++ b/src/smpi/smpi_shared.cpp @@ -427,7 +427,7 @@ void smpi_shared_free(void *ptr) xbt_free(meta->second.data); } - munmap(ptr, 0); // the POSIX says that I should not give 0 as a length, but it seems to work OK + munmap(ptr, meta->second.size); } else { XBT_DEBUG("Classic free of %p", ptr); xbt_free(ptr);