[Openmp-commits] [PATCH] D67326: [OpenMP] FreeBSD address check if mapped more native

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Sep 8 05:17:09 PDT 2019


Hahnfeld added reviewers: jlpeyton, AndreyChurbanov.
Hahnfeld added inline comments.


================
Comment at: openmp/runtime/src/z_Linux_util.cpp:2027
+  int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_VMMAP, getpid()};
+  rc = sysctl(mib, 4, nullptr, &lstsz, nullptr, 0);
+  if (rc < 0)
----------------
Even though it's C++, should this pass `NULL` to the C function `sysctl`?


================
Comment at: openmp/runtime/src/z_Linux_util.cpp:2030
+     return 0;
+  lstsz = lstsz * 4 / 3;
+  buf = reinterpret_cast<char *>(kmpc_malloc(lstsz));
----------------
Can you add a comment explaining why this is necessary?


Repository:
  rOMP OpenMP

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67326/new/

https://reviews.llvm.org/D67326





More information about the Openmp-commits mailing list