v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
platform-linux.h
Go to the documentation of this file.
1
// Copyright 2022 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_PLATFORM_PLATFORM_LINUX_H_
6
#define V8_BASE_PLATFORM_PLATFORM_LINUX_H_
7
8
#include <sys/types.h>
9
10
#include <cstdint>
11
#include <optional>
12
#include <string>
13
14
#include "
src/base/base-export.h
"
15
#include "
src/base/platform/platform.h
"
16
17
namespace
v8
{
18
namespace
base
{
19
20
// Represents a memory region, as parsed from /proc/PID/maps.
21
// Visible for testing.
22
struct
V8_BASE_EXPORT
MemoryRegion
{
23
uintptr_t
start
;
24
uintptr_t
end
;
25
char
permissions[5];
26
off_t
offset
;
27
dev_t
dev
;
28
ino_t
inode
;
29
std::string
pathname
;
30
31
// |line| must not contains the tail '\n'.
32
static
std::optional<MemoryRegion> FromMapsLine(
const
char
* line);
33
};
34
35
// The |fp| parameter is for testing, to pass a fake /proc/self/maps file.
36
V8_BASE_EXPORT
std::vector<OS::SharedLibraryAddress>
GetSharedLibraryAddresses
(
37
FILE* fp);
38
39
}
// namespace base
40
}
// namespace v8
41
42
#endif
// V8_BASE_PLATFORM_PLATFORM_LINUX_H_
base-export.h
V8_BASE_EXPORT
#define V8_BASE_EXPORT
Definition
base-export.h:26
base
OpIndex base
Definition
instruction-selector-ia32.cc:65
v8::base::GetSharedLibraryAddresses
std::vector< OS::SharedLibraryAddress > GetSharedLibraryAddresses(FILE *fp)
Definition
platform-linux.cc:242
v8
Definition
api-arguments-inl.h:19
platform.h
v8::base::MemoryRegion
Definition
platform-linux.h:22
v8::base::MemoryRegion::start
uintptr_t start
Definition
platform-linux.h:23
v8::base::MemoryRegion::inode
ino_t inode
Definition
platform-linux.h:28
v8::base::MemoryRegion::end
uintptr_t end
Definition
platform-linux.h:24
v8::base::MemoryRegion::pathname
std::string pathname
Definition
platform-linux.h:29
v8::base::MemoryRegion::offset
off_t offset
Definition
platform-linux.h:26
v8::base::MemoryRegion::dev
dev_t dev
Definition
platform-linux.h:27
src
base
platform
platform-linux.h
Generated on Sun Apr 6 2025 21:08:50 for v8 by
1.12.0