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

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

Issue 227113011: Expose the virtual memory limit to blink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | content/zygote/zygote_main_linux.cc » ('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/blink_platform_impl.h" 5 #include "content/child/blink_platform_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 } 936 }
937 937
938 size_t BlinkPlatformImpl::actualMemoryUsageMB() { 938 size_t BlinkPlatformImpl::actualMemoryUsageMB() {
939 return getMemoryUsageMB(true); 939 return getMemoryUsageMB(true);
940 } 940 }
941 941
942 size_t BlinkPlatformImpl::physicalMemoryMB() { 942 size_t BlinkPlatformImpl::physicalMemoryMB() {
943 return static_cast<size_t>(base::SysInfo::AmountOfPhysicalMemoryMB()); 943 return static_cast<size_t>(base::SysInfo::AmountOfPhysicalMemoryMB());
944 } 944 }
945 945
946 size_t BlinkPlatformImpl::virtualMemoryLimitMB() {
947 return static_cast<size_t>(base::SysInfo::AmountOfVirtualMemoryMB());
948 }
949
946 size_t BlinkPlatformImpl::numberOfProcessors() { 950 size_t BlinkPlatformImpl::numberOfProcessors() {
947 return static_cast<size_t>(base::SysInfo::NumberOfProcessors()); 951 return static_cast<size_t>(base::SysInfo::NumberOfProcessors());
948 } 952 }
949 953
950 void BlinkPlatformImpl::startHeapProfiling( 954 void BlinkPlatformImpl::startHeapProfiling(
951 const blink::WebString& prefix) { 955 const blink::WebString& prefix) {
952 // FIXME(morrita): Make this built on windows. 956 // FIXME(morrita): Make this built on windows.
953 #if !defined(NO_TCMALLOC) && defined(USE_TCMALLOC) && !defined(OS_WIN) 957 #if !defined(NO_TCMALLOC) && defined(USE_TCMALLOC) && !defined(OS_WIN)
954 HeapProfilerStart(prefix.utf8().data()); 958 HeapProfilerStart(prefix.utf8().data());
955 #endif 959 #endif
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 } 1046 }
1043 1047
1044 // static 1048 // static
1045 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { 1049 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) {
1046 WebThreadImplForMessageLoop* impl = 1050 WebThreadImplForMessageLoop* impl =
1047 static_cast<WebThreadImplForMessageLoop*>(thread); 1051 static_cast<WebThreadImplForMessageLoop*>(thread);
1048 delete impl; 1052 delete impl;
1049 } 1053 }
1050 1054
1051 } // namespace content 1055 } // namespace content
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | content/zygote/zygote_main_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698