OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |