OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file/namespace contains utility functions for enumerating, ending and | 5 // This file/namespace contains utility functions for enumerating, ending and |
6 // computing statistics of processes. | 6 // computing statistics of processes. |
7 | 7 |
8 #ifndef BASE_PROCESS_UTIL_H_ | 8 #ifndef BASE_PROCESS_UTIL_H_ |
9 #define BASE_PROCESS_UTIL_H_ | 9 #define BASE_PROCESS_UTIL_H_ |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/time.h" | 12 #include "base/time/time.h" |
13 | 13 |
14 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
15 #include <windows.h> | 15 #include <windows.h> |
16 #include <tlhelp32.h> | 16 #include <tlhelp32.h> |
17 #elif defined(OS_MACOSX) || defined(OS_BSD) | 17 #elif defined(OS_MACOSX) || defined(OS_BSD) |
18 // malloc_zone_t is defined in <malloc/malloc.h>, but this forward declaration | 18 // malloc_zone_t is defined in <malloc/malloc.h>, but this forward declaration |
19 // is sufficient for GetPurgeableZone() below. | 19 // is sufficient for GetPurgeableZone() below. |
20 typedef struct _malloc_zone_t malloc_zone_t; | 20 typedef struct _malloc_zone_t malloc_zone_t; |
21 #if !defined(OS_BSD) | 21 #if !defined(OS_BSD) |
22 #include <mach/mach.h> | 22 #include <mach/mach.h> |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 // YOUR CODE IS LIKELY TO BE REVERTED. THANK YOU. | 515 // YOUR CODE IS LIKELY TO BE REVERTED. THANK YOU. |
516 // | 516 // |
517 // TODO(shess): Weird place to put it, but this is where the OOM | 517 // TODO(shess): Weird place to put it, but this is where the OOM |
518 // killer currently lives. | 518 // killer currently lives. |
519 BASE_EXPORT void* UncheckedMalloc(size_t size); | 519 BASE_EXPORT void* UncheckedMalloc(size_t size); |
520 #endif // defined(OS_MACOSX) | 520 #endif // defined(OS_MACOSX) |
521 | 521 |
522 } // namespace base | 522 } // namespace base |
523 | 523 |
524 #endif // BASE_PROCESS_UTIL_H_ | 524 #endif // BASE_PROCESS_UTIL_H_ |
OLD | NEW |