[PATCH] D42822: [sanitizer] Implement GetRSS on Windows
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 09:07:51 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT325020: [sanitizer] Implement GetRSS on Windows (authored by cryptoad, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D42822?vs=132484&id=134056#toc
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D42822
Files:
lib/sanitizer_common/sanitizer_win.cc
Index: lib/sanitizer_common/sanitizer_win.cc
===================================================================
--- lib/sanitizer_common/sanitizer_win.cc
+++ lib/sanitizer_common/sanitizer_win.cc
@@ -763,7 +763,10 @@
}
uptr GetRSS() {
- return 0;
+ PROCESS_MEMORY_COUNTERS counters;
+ if (!GetProcessMemoryInfo(GetCurrentProcess(), &counters, sizeof(counters)))
+ return 0;
+ return counters.WorkingSetSize;
}
void *internal_start_thread(void (*func)(void *arg), void *arg) { return 0; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42822.134056.patch
Type: text/x-patch
Size: 504 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180213/7e9c50af/attachment.bin>
More information about the llvm-commits
mailing list