scottmg | aaa608f | 2017-05-24 05:56:09 | [diff] [blame] | 1 | // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "base/sys_info.h" |
| 6 | |
| 7 | #include <magenta/syscalls.h> |
| 8 | |
Scott Graham | 324443a | 2017-07-31 23:08:42 | [diff] [blame] | 9 | #include "base/logging.h" |
| 10 | |
scottmg | aaa608f | 2017-05-24 05:56:09 | [diff] [blame] | 11 | namespace base { |
| 12 | |
| 13 | // static |
Eric Karl | a628c09 | 2017-07-26 01:18:37 | [diff] [blame] | 14 | int64_t SysInfo::AmountOfPhysicalMemoryImpl() { |
scottmg | aaa608f | 2017-05-24 05:56:09 | [diff] [blame] | 15 | return mx_system_get_physmem(); |
| 16 | } |
| 17 | |
| 18 | // static |
Scott Graham | 324443a | 2017-07-31 23:08:42 | [diff] [blame] | 19 | int64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() { |
| 20 | // TODO(fuchsia): https://crbug.com/706592 This is not exposed. |
| 21 | NOTREACHED(); |
| 22 | return 0; |
| 23 | } |
| 24 | |
| 25 | // static |
scottmg | aaa608f | 2017-05-24 05:56:09 | [diff] [blame] | 26 | int SysInfo::NumberOfProcessors() { |
| 27 | return mx_system_get_num_cpus(); |
| 28 | } |
| 29 | |
Wez | 8f8498b3 | 2017-08-18 04:26:34 | [diff] [blame] | 30 | // static |
| 31 | int64_t SysInfo::AmountOfVirtualMemory() { |
| 32 | return 0; |
| 33 | } |
| 34 | |
scottmg | aaa608f | 2017-05-24 05:56:09 | [diff] [blame] | 35 | } // namespace base |