From: Matthieu Volat Date: Thu, 17 Nov 2016 12:03:32 +0000 (+0100) Subject: In FreeBSD map backend, mark stack same as in Linux X-Git-Tag: v3_14~140^2~3 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/da8e6028a3178309a56db8bbf5e10f84f3791140?ds=sidebyside In FreeBSD map backend, mark stack same as in Linux --- diff --git a/src/xbt/memory_map.cpp b/src/xbt/memory_map.cpp index 61355f491c..fed4b2c572 100644 --- a/src/xbt/memory_map.cpp +++ b/src/xbt/memory_map.cpp @@ -235,16 +235,20 @@ XBT_PRIVATE std::vector get_memory_map(pid_t pid) /* Inode */ memreg.inode = vmentries[i].kve_vn_fileid; - /* - * Path. Linuxize result by giving an anonymous mapping a path from - * the previous mapping... provided previous is vnode and has a path. - */ + /* + * Path. Linuxize result by giving an anonymous mapping a path from + * the previous mapping, provided previous is vnode and has a path, + * and mark the stack. + */ if (vmentries[i].kve_path[0] != '\0') memreg.pathname = vmentries[i].kve_path; else if (vmentries[i].kve_type == KVME_TYPE_DEFAULT && vmentries[i-1].kve_type == KVME_TYPE_VNODE && vmentries[i-1].kve_path[0] != '\0') memreg.pathname = vmentries[i-1].kve_path; + else if (vmentries[i].kve_type == KVME_TYPE_DEFAULT + && vmentries[i].kve_flags & KVME_FLAG_GROWS_DOWN) + memreg.pathname = "[stack]"; ret.push_back(std::move(memreg)); }