MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / CodeSizeValidation

Method CodeSizeValidation

Source/Tools/CodeSizeValidation/Main.cpp:18–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16class CodeSizeValidation final {
17public:
18 CodeSizeValidation() {
19 constexpr uint64_t Code_start_page = 0x1'0000;
20
21 CodeStart = FEXCore::Allocator::mmap(reinterpret_cast<void*>(Code_start_page), MAX_CODE_SIZE, PROT_READ | PROT_WRITE,
22 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
23 if (reinterpret_cast<uint64_t>(CodeStart) != Code_start_page) {
24 LogMan::Msg::AFmt("Couldn't allocate test region!");
25 FEXCore::Allocator::VirtualFree(CodeStart, MAX_CODE_SIZE);
26 CodeStart = nullptr;
27 return;
28 }
29 }
30
31 struct InstructionStats {
32 uint64_t GuestCodeInstructions {};

Callers

nothing calls this directly

Calls 2

AFmtFunction · 0.85
VirtualFreeFunction · 0.85

Tested by

no test coverage detected