Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: base/process/process_metrics_win.cc

Issue 1445003002: Use std::default_delete as the default deleter for scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: How many trial and errors before this builds on the Windows bots Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/memory/scoped_ptr_unittest.cc ('k') | base/trace_event/memory_dump_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 10
11 #include <algorithm>
12
11 #include "base/logging.h" 13 #include "base/logging.h"
12 #include "base/sys_info.h" 14 #include "base/sys_info.h"
13 15
14 namespace base { 16 namespace base {
15 namespace { 17 namespace {
16 18
17 // System pagesize. This value remains constant on x86/64 architectures. 19 // System pagesize. This value remains constant on x86/64 architectures.
18 const int PAGESIZE_KB = 4; 20 const int PAGESIZE_KB = 4;
19 21
20 typedef NTSTATUS(WINAPI* NTQUERYSYSTEMINFORMATION)( 22 typedef NTSTATUS(WINAPI* NTQUERYSYSTEMINFORMATION)(
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 318
317 meminfo->total = mem_status.ullTotalPhys / 1024; 319 meminfo->total = mem_status.ullTotalPhys / 1024;
318 meminfo->free = mem_status.ullAvailPhys / 1024; 320 meminfo->free = mem_status.ullAvailPhys / 1024;
319 meminfo->swap_total = mem_status.ullTotalPageFile / 1024; 321 meminfo->swap_total = mem_status.ullTotalPageFile / 1024;
320 meminfo->swap_free = mem_status.ullAvailPageFile / 1024; 322 meminfo->swap_free = mem_status.ullAvailPageFile / 1024;
321 323
322 return true; 324 return true;
323 } 325 }
324 326
325 } // namespace base 327 } // namespace base
OLDNEW
« no previous file with comments | « base/memory/scoped_ptr_unittest.cc ('k') | base/trace_event/memory_dump_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698