Andrew Top | 0d1858f | 2019-05-15 22:01:47 -0700 | [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 <zircon/syscalls.h> |
| 8 | |
| 9 | #include "base/logging.h" |
| 10 | #include "starboard/types.h" |
| 11 | |
| 12 | namespace base { |
| 13 | |
| 14 | // static |
| 15 | int64_t SysInfo::AmountOfPhysicalMemoryImpl() { |
| 16 | return zx_system_get_physmem(); |
| 17 | } |
| 18 | |
| 19 | // static |
| 20 | int64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() { |
| 21 | // TODO(fuchsia): https://crbug.com/706592 This is not exposed. |
| 22 | NOTREACHED(); |
| 23 | return 0; |
| 24 | } |
| 25 | |
| 26 | // static |
| 27 | int SysInfo::NumberOfProcessors() { |
| 28 | return zx_system_get_num_cpus(); |
| 29 | } |
| 30 | |
| 31 | // static |
| 32 | int64_t SysInfo::AmountOfVirtualMemory() { |
| 33 | return 0; |
| 34 | } |
| 35 | |
| 36 | } // namespace base |