OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <dlfcn.h> | 5 #include <dlfcn.h> |
6 #include <fcntl.h> | 6 #include <fcntl.h> |
| 7 #include <stddef.h> |
7 #include <stdlib.h> | 8 #include <stdlib.h> |
8 #include <string.h> | 9 #include <string.h> |
9 #include <sys/mman.h> | 10 #include <sys/mman.h> |
10 #include <unistd.h> | 11 #include <unistd.h> |
11 #include <map> | 12 #include <map> |
12 | 13 |
13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "tools/android/heap_profiler/heap_profiler.h" | 15 #include "tools/android/heap_profiler/heap_profiler.h" |
15 | 16 |
16 namespace { | 17 namespace { |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 char* const env[] = {env_ld_preload, env_ld_lib_path, 0}; | 170 char* const env[] = {env_ld_preload, env_ld_lib_path, 0}; |
170 execve("/proc/self/exe", argv, env); | 171 execve("/proc/self/exe", argv, env); |
171 // execve() never returns, unless something goes wrong. | 172 // execve() never returns, unless something goes wrong. |
172 perror("execve"); | 173 perror("execve"); |
173 assert(false); | 174 assert(false); |
174 } | 175 } |
175 | 176 |
176 testing::InitGoogleTest(&argc, argv); | 177 testing::InitGoogleTest(&argc, argv); |
177 return RUN_ALL_TESTS(); | 178 return RUN_ALL_TESTS(); |
178 } | 179 } |
OLD | NEW |