[PATCH] D119572: Add virtual mem size when setting RSS limit on Apple platforms.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 11 14:56:32 PST 2022


fhahn added inline comments.


================
Comment at: tools/timeit.c:347
+    // and add the user requested limit.
+    struct proc_taskinfo task_info;
+    proc_pidinfo(getpid(), PROC_PIDTASKINFO, 0, &task_info, sizeof(task_info));
----------------
ab wrote:
> We don't have to abort if `proc_pidinfo` fails, but we should be resilient to that.  Maybe explicitly initialize `task_info` to 0 first?  If you can't because it's opaque, I guess you do have to check for success after all ;)
Good point, I updated the code to zero initialize the struct.


Repository:
  rT test-suite

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

https://reviews.llvm.org/D119572



More information about the llvm-commits mailing list