3 #include <sanitizer/allocator_interface.h>
6 // RUN: %clang_cl_asan %Od %s %Fe%t
8 // REQUIRES: asan-64-bits
11 PROCESS_MEMORY_COUNTERS counters
;
12 if (!GetProcessMemoryInfo(GetCurrentProcess(), &counters
, sizeof(counters
)))
14 return counters
.WorkingSetSize
;
18 for (int i
= 0; i
< 1000; i
++) {
19 void* a
= malloc(1000);
22 size_t rss_pre
= GetRSS();
23 __sanitizer_purge_allocator();
24 size_t rss_post
= GetRSS();
26 if (rss_pre
<= rss_post
){