1 // Tests heap_profile=1.
2 // Printing memory profiling only works in the configuration where we can
4 // REQUIRES: leak-detection
6 // RUN: %clangxx_asan %s -o %t
7 // RUN: %env_asan_opts=heap_profile=1 %run %t 2>&1 | FileCheck %s
8 #include <sanitizer/common_interface_defs.h>
18 for (int i
= 0; i
< 3; i
++) {
19 const size_t kSize
= 13000000;
20 char *x
= new char[kSize
];
27 // CHECK: HEAP PROFILE at RSS
28 // CHECK: 13000000 byte(s)
29 // CHECK: HEAP PROFILE at RSS
30 // CHECK: 26000000 byte(s)
31 // CHECK: HEAP PROFILE at RSS
32 // CHECK: 39000000 byte(s)