http://llvm.org/bugs/show_bug.cgi?id=20925
Bug ID: 20925
Summary: Process::GetMallocUsage() may be wrong for non-glibc
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Support Libraries
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
The KLEE code has this comment around its function to get memory usage:
--
struct mallinfo mi = ::mallinfo();
+ // The malloc implementation in glibc (pmalloc2)
+ // does not include mmap()'ed memory in mi.uordblks
+ // but other implementations (e.g. tcmalloc) do.
+#if defined(__GLIBC__)
return mi.uordblks + mi.hblkhd;
+#else
+ return mi.uordblks;
+#endif
--
but LLVM's Process::GetMallocUsage() does not have that logic. Someone should
check this...
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs