Upload upstream chromium 69.0.3497
[platform/framework/web/chromium-efl.git] / base / sys_info_fuchsia.cc
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
11 namespace base {
12
13 // static
14 int64_t SysInfo::AmountOfPhysicalMemoryImpl() {
15   return zx_system_get_physmem();
16 }
17
18 // static
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
26 int SysInfo::NumberOfProcessors() {
27   return zx_system_get_num_cpus();
28 }
29
30 // static
31 int64_t SysInfo::AmountOfVirtualMemory() {
32   return 0;
33 }
34
35 }  // namespace base