v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
sys-info.h
Go to the documentation of this file.
1// Copyright 2014 the V8 project 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#ifndef V8_BASE_SYS_INFO_H_
6#define V8_BASE_SYS_INFO_H_
7
8#include <stdint.h>
9
12
13namespace v8 {
14namespace base {
15
17 public:
18 // Returns the number of logical processors/core on the current machine.
19 static int NumberOfProcessors();
20
21 // Returns the number of bytes of physical memory on the current machine.
22 static int64_t AmountOfPhysicalMemory();
23
24 // Returns the number of bytes of virtual memory of this process. A return
25 // value of zero means that there is no limit on the available virtual memory.
26 static int64_t AmountOfVirtualMemory();
27
28 // Returns the end of the virtual address space available to this process.
29 // Memory mappings at or above this address cannot be addressed by this
30 // process, so all pointer values will be below this value.
31 // If the virtual address space is not limited, this will return -1.
32 static uintptr_t AddressSpaceEnd();
33};
34
35} // namespace base
36} // namespace v8
37
38#endif // V8_BASE_SYS_INFO_H_
#define V8_BASE_EXPORT
Definition base-export.h:26