blob: d741520aeb5eca73df048e78ea04112508dae95d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <random>
#include "core/hle/kernel/k_code_memory.h"
namespace Kernel {
class KernelCore;
}
namespace Service::JIT {
class CodeMemory {
public:
Result Initialize(Kernel::KernelCore& kernel, Kernel::KProcess& process, Kernel::KCodeMemory& code_memory, size_t size, Kernel::Svc::MemoryPermission perm, std::mt19937_64& generate_random);
void Finalize(Kernel::KernelCore& kernel);
size_t GetSize() const {
return m_size;
}
u64 GetAddress() const {
return m_address;
}
Kernel::KCodeMemory* m_code_memory{};
size_t m_size{};
u64 m_address{};
Kernel::Svc::MemoryPermission m_perm{};
};
} // namespace Service::JIT
|