blob: ea24e51734ac39382c5a48c9c8206d71b864ce3b [file] [log] [blame]
scottmgaaa608f2017-05-24 05:56:091// 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 Graham324443a2017-07-31 23:08:429#include "base/logging.h"
10
scottmgaaa608f2017-05-24 05:56:0911namespace base {
12
13// static
Eric Karla628c092017-07-26 01:18:3714int64_t SysInfo::AmountOfPhysicalMemoryImpl() {
scottmgaaa608f2017-05-24 05:56:0915 return mx_system_get_physmem();
16}
17
18// static
Scott Graham324443a2017-07-31 23:08:4219int64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() {
20 // TODO(fuchsia): https://crbug.com/706592 This is not exposed.
21 NOTREACHED();
22 return 0;
23}
24
25// static
scottmgaaa608f2017-05-24 05:56:0926int SysInfo::NumberOfProcessors() {
27 return mx_system_get_num_cpus();
28}
29
Wez8f8498b32017-08-18 04:26:3430// static
31int64_t SysInfo::AmountOfVirtualMemory() {
32 return 0;
33}
34
scottmgaaa608f2017-05-24 05:56:0935} // namespace base