v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
default-thread-isolated-allocator.h
Go to the documentation of this file.
1// Copyright 2023 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_LIBPLATFORM_DEFAULT_THREAD_ISOLATED_ALLOCATOR_H_
6#define V8_LIBPLATFORM_DEFAULT_THREAD_ISOLATED_ALLOCATOR_H_
7
12
13namespace v8 {
14namespace platform {
15
17 : public NON_EXPORTED_BASE(ThreadIsolatedAllocator) {
18 public:
20
22
23 void* Allocate(size_t size) override;
24
25 void Free(void* object) override;
26
27 enum Type Type() const override;
28
29 int Pkey() const override;
30
31 bool Valid() const;
32
33 private:
34#if V8_HAS_PKU_JIT_WRITE_PROTECT
35 const int pkey_;
36#endif
37};
38
39} // namespace platform
40} // namespace v8
41
42#endif // V8_LIBPLATFORM_DEFAULT_THREAD_ISOLATED_ALLOCATOR_H_
#define V8_PLATFORM_EXPORT
#define NON_EXPORTED_BASE(code)