![]() |
v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
|
#include <platform.h>
Classes | |
class | MemoryMappedFile |
struct | MemoryRange |
struct | SharedLibraryAddress |
struct | StackFrame |
Public Types | |
enum class | MemoryPermission { kNoAccess , kRead , kReadWrite , kReadWriteExecute , kReadExecute , kNoAccessWillJitLater } |
using | Address = uintptr_t |
Static Public Member Functions | |
static void | Initialize (AbortMode abort_mode, const char *const gc_fake_mmap) |
static bool | IsHardwareEnforcedShadowStacksEnabled () |
static int | GetUserTime (uint32_t *secs, uint32_t *usecs) |
static int | GetPeakMemoryUsageKb () |
static double | TimeCurrentMillis () |
static TimezoneCache * | CreateTimezoneCache () |
static int | GetLastError () |
static FILE * | FOpen (const char *path, const char *mode) |
static bool | Remove (const char *path) |
static char | DirectorySeparator () |
static bool | isDirectorySeparator (const char ch) |
static FILE * | OpenTemporaryFile () |
static | PRINTF_FORMAT (1, 2) void Print(const char *format |
static static | PRINTF_FORMAT (1, 0) void VPrint(const char *format |
static | PRINTF_FORMAT (2, 3) void FPrint(FILE *out |
static const char static | PRINTF_FORMAT (2, 0) void VFPrint(FILE *out |
static | PRINTF_FORMAT (1, 2) void PrintError(const char *format |
static static | PRINTF_FORMAT (1, 0) void VPrintError(const char *format |
static PlatformSharedMemoryHandle | CreateSharedMemoryHandleForTesting (size_t size) |
static void | DestroySharedMemoryHandle (PlatformSharedMemoryHandle handle) |
static bool | HasLazyCommits () |
static void | Sleep (TimeDelta interval) |
static void | Abort () |
static void | DebugBreak () |
static | PRINTF_FORMAT (3, 4) int SNPrintF(char *str |
static int const char static | PRINTF_FORMAT (3, 0) int VSNPrintF(char *str |
static void | StrNCpy (char *dest, int length, const char *src, size_t n) |
static std::vector< SharedLibraryAddress > | GetSharedLibraryAddresses () |
static void | SignalCodeMovingGC () |
static bool | ArmUsingHardFloat () |
static int | ActivationFrameAlignment () |
static int | GetCurrentProcessId () |
static int | GetCurrentThreadId () |
static void | AdjustSchedulingParams () |
static std::optional< MemoryRange > | GetFirstFreeMemoryRangeWithin (Address boundary_start, Address boundary_end, size_t minimum_size, size_t alignment) |
static void | ExitProcess (int exit_code) |
static V8_WARN_UNUSED_RESULT constexpr bool | IsRemapPageSupported () |
static V8_WARN_UNUSED_RESULT bool | RemapPages (const void *address, size_t size, void *new_address, MemoryPermission access) |
static void | SetDataReadOnly (void *address, size_t size) |
Public Attributes | |
static static va_list | args |
static const char * | format |
static const char static const char * | format |
static const char static const char va_list | args |
static int | length |
static int const char * | format |
static int const char static int | length |
static int const char static int const char * | format |
static int const char static int const char va_list | args |
Static Public Attributes | |
static const char *const | LogFileOpenMode = "w+" |
static const int | kStackWalkError = -1 |
static const int | kStackWalkMaxNameLen = 256 |
static const int | kStackWalkMaxTextLen = 256 |
Private Member Functions | |
FRIEND_TEST (OS, RemapPages) | |
DISALLOW_IMPLICIT_CONSTRUCTORS (OS) | |
Static Private Member Functions | |
static int | GetCurrentThreadIdInternal () |
static size_t | AllocatePageSize () |
static size_t | CommitPageSize () |
static void | SetRandomMmapSeed (int64_t seed) |
static void * | GetRandomMmapAddr () |
static V8_WARN_UNUSED_RESULT void * | Allocate (void *address, size_t size, size_t alignment, MemoryPermission access) |
static V8_WARN_UNUSED_RESULT void * | AllocateShared (size_t size, MemoryPermission access) |
static V8_WARN_UNUSED_RESULT void * | RemapShared (void *old_address, void *new_address, size_t size) |
static void | Free (void *address, size_t size) |
static V8_WARN_UNUSED_RESULT void * | AllocateShared (void *address, size_t size, OS::MemoryPermission access, PlatformSharedMemoryHandle handle, uint64_t offset) |
static void | FreeShared (void *address, size_t size) |
static void | Release (void *address, size_t size) |
static V8_WARN_UNUSED_RESULT bool | SetPermissions (void *address, size_t size, MemoryPermission access) |
static V8_WARN_UNUSED_RESULT bool | RecommitPages (void *address, size_t size, MemoryPermission access) |
static V8_WARN_UNUSED_RESULT bool | DiscardSystemPages (void *address, size_t size) |
static V8_WARN_UNUSED_RESULT bool | DecommitPages (void *address, size_t size) |
static V8_WARN_UNUSED_RESULT bool | SealPages (void *address, size_t size) |
static V8_WARN_UNUSED_RESULT bool | CanReserveAddressSpace () |
static V8_WARN_UNUSED_RESULT std::optional< AddressSpaceReservation > | CreateAddressSpaceReservation (void *hint, size_t size, size_t alignment, MemoryPermission max_permission) |
static void | FreeAddressSpaceReservation (AddressSpaceReservation reservation) |
Static Private Attributes | |
static const int | msPerSecond = 1000 |
Friends | |
class | AddressSpaceReservation |
class | MemoryMappedFile |
class | PosixMemoryMappedFile |
class | v8::base::PageAllocator |
class | v8::base::VirtualAddressSpace |
class | v8::base::VirtualAddressSubspace |
Definition at line 145 of file platform.h.
using v8::base::OS::Address = uintptr_t |
Definition at line 315 of file platform.h.
|
strong |
Enumerator | |
---|---|
kNoAccess | |
kRead | |
kReadWrite | |
kReadWriteExecute | |
kReadExecute | |
kNoAccessWillJitLater |
Definition at line 215 of file platform.h.
|
static |
|
static |
|
static |
|
staticprivate |
Definition at line 99 of file platform-cygwin.cc.
|
staticprivate |
|
staticprivate |
Definition at line 456 of file platform-posix.cc.
|
staticprivate |
|
static |
|
staticprivate |
|
staticprivate |
Definition at line 305 of file platform-posix.cc.
|
staticprivate |
Definition at line 339 of file platform-fuchsia.cc.
|
static |
Definition at line 144 of file platform-darwin.cc.
|
static |
|
static |
|
staticprivate |
Definition at line 168 of file platform-aix.cc.
|
static |
Definition at line 156 of file platform-darwin.cc.
|
static |
|
private |
|
staticprivate |
|
static |
|
static |
|
staticprivate |
Definition at line 150 of file platform-cygwin.cc.
|
staticprivate |
|
staticprivate |
Definition at line 295 of file platform-fuchsia.cc.
|
private |
|
static |
|
static |
Definition at line 29 of file platform.cc.
|
staticprivate |
|
static |
Definition at line 132 of file platform-aix.cc.
|
static |
|
static |
|
staticprivate |
Definition at line 319 of file platform-posix.cc.
|
static |
Definition at line 88 of file platform-aix.cc.
|
static |
Definition at line 389 of file platform-fuchsia.cc.
|
static |
|
static |
Definition at line 254 of file platform-fuchsia.cc.
|
static |
Definition at line 956 of file platform-posix.cc.
|
static |
Definition at line 273 of file platform-posix.cc.
|
inlinestaticconstexpr |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
staticprivate |
Definition at line 176 of file platform-cygwin.cc.
|
staticprivate |
Definition at line 158 of file platform-cygwin.cc.
|
static |
Definition at line 184 of file platform-darwin.cc.
|
staticprivate |
|
static |
Definition at line 950 of file platform-posix.cc.
|
staticprivate |
|
static |
Definition at line 308 of file platform-fuchsia.cc.
|
staticprivate |
Definition at line 165 of file platform-cygwin.cc.
|
staticprivate |
|
static |
|
static |
|
static |
|
static |
Definition at line 912 of file platform-posix.cc.
|
friend |
Definition at line 364 of file platform.h.
|
friend |
Definition at line 365 of file platform.h.
|
friend |
Definition at line 366 of file platform.h.
|
friend |
Definition at line 367 of file platform.h.
|
friend |
Definition at line 368 of file platform.h.
|
friend |
Definition at line 369 of file platform.h.
static static va_list v8::base::OS::args |
Definition at line 200 of file platform.h.
const char static const char va_list v8::base::OS::args |
Definition at line 205 of file platform.h.
int const char static int const char va_list v8::base::OS::args |
Definition at line 270 of file platform.h.
const char* v8::base::OS::format |
Definition at line 203 of file platform.h.
const char static const char* v8::base::OS::format |
Definition at line 204 of file platform.h.
int const char* v8::base::OS::format |
Definition at line 268 of file platform.h.
int const char static int const char* v8::base::OS::format |
Definition at line 270 of file platform.h.
|
static |
Definition at line 243 of file platform.h.
|
static |
Definition at line 244 of file platform.h.
|
static |
Definition at line 245 of file platform.h.
int v8::base::OS::length |
Definition at line 267 of file platform.h.
int const char static int v8::base::OS::length |
Definition at line 269 of file platform.h.
|
static |
Definition at line 194 of file platform.h.
|
staticprivate |
Definition at line 422 of file platform.h.