[PATCH] Sanitizers: Implement `GetRSS` on Mac OS X
Alexander Potapenko
glider at google.com
Tue May 12 02:36:00 PDT 2015
LGTM with two nits.
================
Comment at: lib/sanitizer_common/sanitizer_mac.cc:47
@@ -46,2 +46,3 @@
#include <errno.h>
+#include <mach/mach.h>
----------------
While at it, can you please sort this block of includes alphabetically?
================
Comment at: lib/sanitizer_common/sanitizer_mac.cc:343
@@ +342,3 @@
+ Report("Cannot get task info. Error: %d\n", result);
+ Die();
+ }
----------------
NB: currently task_info() can't possibly return anything but KERN_SUCCESS, so it's perfectly fine to die.
================
Comment at: lib/sanitizer_common/sanitizer_mac.cc:345
@@ +344,3 @@
+ }
+
+ return info.resident_size;
----------------
Nit: spare newline.
http://reviews.llvm.org/D9636
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list