[sanitizer] Implement GetRSS on Windows
authorKostya Kortchinsky <kostyak@google.com>
Tue, 13 Feb 2018 17:05:54 +0000 (17:05 +0000)
committerKostya Kortchinsky <kostyak@google.com>
Tue, 13 Feb 2018 17:05:54 +0000 (17:05 +0000)
commit1ce4642ddca68eb2e319ec7ad4a776b0dd960135
treeab3a29a51f00aa447b061f516b438f2883643445
parentf73ff612cabc043d481b6fdd3b5e7cd92d5f0706
[sanitizer] Implement GetRSS on Windows

Summary:
Pretty straightforward, returning the `WorkingSetSize` of a
`PROCESS_MEMORY_COUNTERS` structure. AFAIU, `GetProcessMemoryInfo` is in
`kernel32.lib` for Windows 7 and above. Support for earlier Windows versions
would require `psapi.lib`, but I don't think those are supported by ASan?

Reviewers: alekseyshl, rnk, vitalybuka

Reviewed By: vitalybuka

Subscribers: vitalybuka, kubamracek, delcypher, llvm-commits, #sanitizers

Differential Revision: https://reviews.llvm.org/D42822

llvm-svn: 325020
compiler-rt/lib/sanitizer_common/sanitizer_win.cc