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

Side by Side Diff: content/child/content_child_helpers.cc

Issue 1544273002: Switch to standard integer types in content/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months 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 | « content/child/content_child_helpers.h ('k') | content/child/database_util.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 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 "content/child/content_child_helpers.h" 5 #include "content/child/content_child_helpers.h"
6 6
7 #include <stdint.h>
8
9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/process/process_metrics.h"
12 #include "build/build_config.h"
13 #include "v8/include/v8.h"
14
7 #if defined(OS_LINUX) 15 #if defined(OS_LINUX)
8 #include <malloc.h> 16 #include <malloc.h>
9 #endif 17 #endif
10 18
11 #include "base/logging.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/process/process_metrics.h"
14 #include "v8/include/v8.h"
15
16 namespace content { 19 namespace content {
17 20
18 #if defined(OS_LINUX) || defined(OS_ANDROID) 21 #if defined(OS_LINUX) || defined(OS_ANDROID)
19 size_t GetMemoryUsageKB() { 22 size_t GetMemoryUsageKB() {
20 struct mallinfo minfo = mallinfo(); 23 struct mallinfo minfo = mallinfo();
21 uint64_t mem_usage = 24 uint64_t mem_usage =
22 #if defined(USE_TCMALLOC) 25 #if defined(USE_TCMALLOC)
23 minfo.uordblks 26 minfo.uordblks
24 #else 27 #else
25 (minfo.hblkhd + minfo.arena) 28 (minfo.hblkhd + minfo.arena)
(...skipping 20 matching lines...) Expand all
46 #else 49 #else
47 size_t GetMemoryUsageKB() { 50 size_t GetMemoryUsageKB() {
48 scoped_ptr<base::ProcessMetrics> process_metrics( 51 scoped_ptr<base::ProcessMetrics> process_metrics(
49 base::ProcessMetrics::CreateProcessMetrics( 52 base::ProcessMetrics::CreateProcessMetrics(
50 base::GetCurrentProcessHandle())); 53 base::GetCurrentProcessHandle()));
51 return process_metrics->GetPagefileUsage() >> 10; 54 return process_metrics->GetPagefileUsage() >> 10;
52 } 55 }
53 #endif 56 #endif
54 57
55 } // namespace content 58 } // namespace content
OLDNEW
« no previous file with comments | « content/child/content_child_helpers.h ('k') | content/child/database_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698