[PATCH] Add FreeBSD support to sanitizers' procmaps facilities
Viktor Kutuzov
vkutuzov at accesssoftek.com
Mon Mar 24 03:50:14 PDT 2014
================
Comment at: lib/sanitizer_common/sanitizer_procmaps_linux.cc:41
@@ +40,3 @@
+ void *VmMap = MmapOrDie(MmapedSize, "ReadProcMaps()");
+ Size = MmapedSize;
+ Err = sysctl(Mib, 4, VmMap, &Size, NULL, 0);
----------------
Alexey Samsonov wrote:
> do you really need this assignment? Why not pass &MmapedSize to sysctl, and leave Size <= MmapedSize?
Umm, not sure I understand what you mean. Without this assignment increasing the MmapedSize value would have no sense. If we pass &MmapedSize to sysctl(), then we lose the amount of mmaped memory. Either case, Size will be less than or equal to MmapedSize.
http://llvm-reviews.chandlerc.com/D3100
More information about the llvm-commits
mailing list