OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "base/process/process_metrics.h" | 5 #include "base/process/process_metrics.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <psapi.h> | 8 #include <psapi.h> |
9 #include <winternl.h> | 9 #include <winternl.h> |
10 #include <algorithm> | |
brettw
2015/11/18 00:21:52
Blank line before this.
| |
10 | 11 |
11 #include "base/logging.h" | 12 #include "base/logging.h" |
12 #include "base/sys_info.h" | 13 #include "base/sys_info.h" |
13 | 14 |
14 namespace base { | 15 namespace base { |
15 namespace { | 16 namespace { |
16 | 17 |
17 // System pagesize. This value remains constant on x86/64 architectures. | 18 // System pagesize. This value remains constant on x86/64 architectures. |
18 const int PAGESIZE_KB = 4; | 19 const int PAGESIZE_KB = 4; |
19 | 20 |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
316 | 317 |
317 meminfo->total = mem_status.ullTotalPhys / 1024; | 318 meminfo->total = mem_status.ullTotalPhys / 1024; |
318 meminfo->free = mem_status.ullAvailPhys / 1024; | 319 meminfo->free = mem_status.ullAvailPhys / 1024; |
319 meminfo->swap_total = mem_status.ullTotalPageFile / 1024; | 320 meminfo->swap_total = mem_status.ullTotalPageFile / 1024; |
320 meminfo->swap_free = mem_status.ullAvailPageFile / 1024; | 321 meminfo->swap_free = mem_status.ullAvailPageFile / 1024; |
321 | 322 |
322 return true; | 323 return true; |
323 } | 324 } |
324 | 325 |
325 } // namespace base | 326 } // namespace base |
OLD | NEW |