naiveproxy/base/sys_info_fuchsia.cc
2018-01-29 00:30:36 +08:00

36 lines
701 B
C++

// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/sys_info.h"
#include <zircon/syscalls.h>
#include "base/logging.h"
namespace base {
// static
int64_t SysInfo::AmountOfPhysicalMemoryImpl() {
return zx_system_get_physmem();
}
// static
int64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() {
// TODO(fuchsia): https://crbug.com/706592 This is not exposed.
NOTREACHED();
return 0;
}
// static
int SysInfo::NumberOfProcessors() {
return zx_system_get_num_cpus();
}
// static
int64_t SysInfo::AmountOfVirtualMemory() {
return 0;
}
} // namespace base