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 |
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 | 809 |
810 int total; | 810 int total; |
811 int free; | 811 int free; |
812 int buffers; | 812 int buffers; |
813 int cached; | 813 int cached; |
814 int active_anon; | 814 int active_anon; |
815 int inactive_anon; | 815 int inactive_anon; |
816 int active_file; | 816 int active_file; |
817 int inactive_file; | 817 int inactive_file; |
818 int shmem; | 818 int shmem; |
| 819 |
| 820 // Gem data will be -1 if not supported. |
| 821 int gem_objects; |
| 822 long long gem_size; |
819 }; | 823 }; |
820 // Retrieves data from /proc/meminfo about system-wide memory consumption. | 824 // Retrieves data from /proc/meminfo about system-wide memory consumption. |
821 // Fills in the provided |meminfo| structure. Returns true on success. | 825 // Fills in the provided |meminfo| structure. Returns true on success. |
822 // Exposed for memory debugging widget. | 826 // Exposed for memory debugging widget. |
823 BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo); | 827 BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo); |
824 #endif // defined(OS_LINUX) || defined(OS_ANDROID) | 828 #endif // defined(OS_LINUX) || defined(OS_ANDROID) |
825 | 829 |
826 // Returns the memory committed by the system in KBytes. | 830 // Returns the memory committed by the system in KBytes. |
827 // Returns 0 if it can't compute the commit charge. | 831 // Returns 0 if it can't compute the commit charge. |
828 BASE_EXPORT size_t GetSystemCommitCharge(); | 832 BASE_EXPORT size_t GetSystemCommitCharge(); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 // YOUR CODE IS LIKELY TO BE REVERTED. THANK YOU. | 871 // YOUR CODE IS LIKELY TO BE REVERTED. THANK YOU. |
868 // | 872 // |
869 // TODO(shess): Weird place to put it, but this is where the OOM | 873 // TODO(shess): Weird place to put it, but this is where the OOM |
870 // killer currently lives. | 874 // killer currently lives. |
871 BASE_EXPORT void* UncheckedMalloc(size_t size); | 875 BASE_EXPORT void* UncheckedMalloc(size_t size); |
872 #endif // defined(OS_MACOSX) | 876 #endif // defined(OS_MACOSX) |
873 | 877 |
874 } // namespace base | 878 } // namespace base |
875 | 879 |
876 #endif // BASE_PROCESS_UTIL_H_ | 880 #endif // BASE_PROCESS_UTIL_H_ |
OLD | NEW |